Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Wait for WAV to complete

This thread is locked; no one can reply to it. rss feed Print
Wait for WAV to complete
Bruce Fox
Member #7,301
May 2006

Hi Guys,

I play a .wav file using "play_sample" and need to wait til that has finished playing until I continue.

Is there a flag I can check for, return value, check on the release of the sound card etc?

Regards,
Bruce.

=========================
Bruce Fox

BAF
Member #2,981
December 2002
avatar

    int splay = play_sample(yoursample, 255, 127, 1000, 0);
    while(voice_check(splay))
      rest(1);

Bruce Fox
Member #7,301
May 2006

Thankyou BAF.

=========================
Bruce Fox

BAF
Member #2,981
December 2002
avatar

You're welcome.

Go to: