Solved

Multimedia API + Delphi

Posted on 1997-05-30
2
438 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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 this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now