Detecting when a sound has stopped - is this possible?

Just starting out? Need help? Post your questions and find answers here.
adshead
User
User
Posts: 14
Joined: Thu Jan 03, 2008 3:06 pm

Detecting when a sound has stopped - is this possible?

Post by adshead »

I can't seem to find anything that will help me determine when a sound I am playing has finished - does anyone know a way to do this?

Basically I am playing a sound when two objects collide - but because collision detection occurs quickly, the beginning of the sound is constanly repeating. I would prefer to only repeat the sound once the first playing of it has finished.

if anyone has done something like this I would love to know about it :)
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Detecting when a sound has stopped - is this possible?

Post by luis »

adshead wrote:I can't seem to find anything that will help me determine when a sound I am playing has finished - does anyone know a way to do this?

It's been requested many times (count me in for that request) , see here for a suggestion (windows only):

http://www.purebasic.fr/english/viewtopic.php?t=30023

and try to search for "isplaying" in the forum.

I would like a callback :-)

http://www.purebasic.fr/english/viewtopic.php?t=13526
Post Reply