Solved

Multimedia API + Delphi

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visual Fox Pro commands 15 50
T-SQL Debugging - Temp Object Content 2 54
WPF - External data binding to controls inside a UserControl 2 68
Authentication of Web Services 3 89
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

791 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