Detect Wav done playing w/API? 
Author Message
 Detect Wav done playing w/API?

How do you let your VB program know when a Wave file is done playing with API
calls. I have tried a few Win32 API calls and constants, but they all lock the
system while the wav is playing. I want to be able to create a play/stop button
on a form and have the stop button disabled after the wav file is done playing.
I wish to give the user the chance to stop playing the wav. I know there are a
few ways to play a wav file using Win32 API's, and I have tried them. All work
great at playing a wav file, but what I need to know is how do I tell the
program that the wav file is done and disable the Stop button. Kinda like the
way MMControl (VB4.0) works. Please e-mail with any sample code,  would be
greatly appreciated. Please do not suggest using "such-n-such API call" as I am
still learning win32Api Functions. An example line of codes would be more
useful and educational.

Thanks to all who respond in advance,
Mike



Sat, 28 Oct 2000 03:00:00 GMT  
 Detect Wav done playing w/API?

You must have not tried them all. WaveOutOpen works but it is a low level
API. You will need to find some good documentation to get it to work. YOu
will also need VB5 or some tool to get the address of a callback function to
pass to WaveOutOpen to get the messages when you app needs to send data to
the Wave device and when the Wave device is finished playing. It can be done
in VB5 fairly easily. Get the books VB5 multimedia adventure set and the
Windows 95 ODBC and API Bible. They are both good. They are where I found
the info to make my programs work. Recording was a little harder but it can
be done as well.

Tommy Martin

Quote:
>How do you let your VB program know when a Wave file is done playing with
API
>calls. I have tried a few Win32 API calls and constants, but they all lock
the
>system while the wav is playing. I want to be able to create a play/stop
button
>on a form and have the stop button disabled after the wav file is done
playing.
>I wish to give the user the chance to stop playing the wav. I know there
are a
>few ways to play a wav file using Win32 API's, and I have tried them. All
work
>great at playing a wav file, but what I need to know is how do I tell the
>program that the wav file is done and disable the Stop button. Kinda like
the
>way MMControl (VB4.0) works. Please e-mail with any sample code,  would be
>greatly appreciated. Please do not suggest using "such-n-such API call" as
I am
>still learning win32Api Functions. An example line of codes would be more
>useful and educational.

>Thanks to all who respond in advance,
>Mike




Sun, 29 Oct 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. HELP: when is a .wav done playing?

2. Detecting sound card for playing WAV files

3. Detecting when a wav has finsihed playing on a sound device

4. How to detect a wav file is playing

5. Play WAV with API

6. play .wav via API

7. playing wav files using API

8. Help: Playing WAV files with this API

9. Help Please : playing wav files with API ....

10. Help please : how to play *.wav with API ??????

11. Using the API to play a WAV file?

12. Playsound API Freeze whilst playing a .WAV

 

 
Powered by phpBB® Forum Software