Google Answers Logo
View Question
 
Q: DirectSound Audio and Notifications: how to play wav file and get timing events ( No Answer,   0 Comments )
Question  
Subject: DirectSound Audio and Notifications: how to play wav file and get timing events
Category: Computers > Programming
Asked by: codenotes-ga
List Price: $200.00
Posted: 05 Dec 2004 13:48 PST
Expires: 05 Dec 2004 18:19 PST
Question ID: 438475
I have to animate a robot who's mouth needs to be in synch with the
speech played from a wav file on a Windows machine (which also
controls the robot). I know the exact timing in milliseconds where
mouth events are to occur.  I have two files, really, a wav file and a
timing file. The wav contains the robots speech, the timing file tells
me when to open and close the mouth to synch with speech.

Presently I am playing the audio with mcicommandstring, and running a
timer in the background that fires events according to the timing
file...However, this technique is not reliable enough..there is too
much drift.

Instead, I would like to use DirectSound API to do this since I see
that this API has the ability for the programmer to attach event
handlers to specific locations in the audio stream.  What I would like
to do is ask DirectSound to play this wav file, but also tell
DirectSound to fire an event whenever certain locations in the
playback are encountered.  For example, I'd like to tell it to play
test.wav, and to fire an event to me at 23msecs, 143 msecs, 2321
msecs, and so on.

I have read and searched the web...there are many discussions of this
cability of DirectSound, but I have never used this API before and am
not very familiar with audio programming generally.

I would like sample code showing, in the simplest possible case, the
setting of time-oriented events in a directsound playback buffer, and
those events being fired.

Ideally, I would like this sample code in .NET/C#/VB.NET (there is a
managed directsound assembly) but I will take an example in any form.

I am also open to entirely different APIs/tools to accomplish this.
Direct sound is simply the API that seems best suited since I want
this to work on 2000 and XP machines.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy