Solved

Multimedia API + Delphi

Posted on 1997-05-30
2
443 Views
Last Modified: 2013-12-03
Do you know if it is possible to play a waveform using selective speed, or to play it in reverse direction?
I am using Delphi and MM API.I found the function waveOutGetPlaybackRate but I am not sure for its use. But anyway it asks for the handle of the waveform-audio output device.How do I get that handle if I didn't use the standart waveOutOpen?
I am using instead a Delphi 3.0 MediaPlayer component, which does not return (as far as I know) that handle.
0
Comment
Question by:kyriacos
2 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1397741
You can use waveOutSetPlaybackRate to change the playback speed. But not all devices support playback rate changes. To determine whether a device supports playback rate changes, use the WAVECAPS_PLAYBACKRATE flag to test the dwSupport member of the WAVEOUTCAPS structure (filled by the waveOutGetDevCaps function). There is another limited method. Load the wave file into a buffer, change the sample rate of the WAVEFORMAT (e.g., from 11025 to 44100) before using waveOutWrite to play it.

To play a waveform in reverse direction, load the wave file into a buffer, reverse the sample before playing it. There is an example C code called 'reverse' in Windows SDK.

I think you have to use waveOutOpen to get the handle.

0
 
LVL 1

Author Comment

by:kyriacos
ID: 1397742
I found the idea of changing sample rates very nice...
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question