Solved

Multimedia API + Delphi

Posted on 1997-05-30
2
452 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

756 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