HELP: when is a .wav done playing? 
Author Message
 HELP: when is a .wav done playing?

ok, i know how to play a wav using API calls, but how can i find out if a
wav is done playing? i'm trying to sync animation to sound, and i want the
animation to stop when the sound stops.

any info appreciated; please reply by email.

thanx!

mike

+--------------------------------------------------------------------------+
http://www.*-*-*.com/ ~bongo/home.htm
Geek Central - Home of Beer Trek
Greatest Star Trek Drinking Game in the Universe
+---------------------------------------------------------------------------+



Tue, 01 Sep 1998 03:00:00 GMT  
 HELP: when is a .wav done playing?

Quote:

>ok, i know how to play a wav using API calls, but how can i find out if a
>wav is done playing? i'm trying to sync animation to sound, and i want the
>animation to stop when the sound stops.

I'm sure this is not the proper way to do it, but I think it'll work...

Using the sndPlaySound options listed below (posted earlier by someone else)
you could start you sound and then in your animation loop call sndPlaySound
with the  
SND_NOSTOP and a bogus file name.  If the call returns false, your sound is
still playing.  Worth a try anyway.

  SND_SYNC       Played synchronously and the function does not
                 return until the sound ends.

  SND_ASYNC      Played asynchronously and the function returns
                 immediately after beginning the sound.

  SND_NODEFAULT  If the sound cannot be found, the function returns
                 silently without playing the default sound.

  SND_LOOP       The sound will continue to play repeatedly until
                 sndPlaySound is called again with the lpszSoundName$
                 parameter set to null.  You must also specify the
                 SND_ASYNC flag to loop sounds.

  SND_NOSTOP     If a sound is playing, the function will immediately
                 return False without playing the requested sound.



Fri, 04 Sep 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Detect Wav done playing w/API?

2. Help with syntax. What am I doing wrong

3. Help on GPF...what am I doing wrong???

4. What am i doing wrong here????? HELP

5. HELP: what am i doing wrong??

6. HELP: what am i doing wrong??

7. HELP - What Am I Doing Wrong

8. Help: What am I doing wrong?

9. HELP: what am i doing wrong??

10. VB4/Win95-HELP: MMcontrol.OCX doesn't issue a DONE event after playing AVI

11. Req help with how to play a .wav sound in Access

12. I need help playing WAV's

 

 
Powered by phpBB® Forum Software