[A5] How can I tell if a sample is currently playing?
Okay, I play a sample with the following example code...
al_play_sample(sfx_mysound, setting.sound_volume, 0.0, 1.0, ALLEGRO_PLAYMODE_ONCE, NULL);
is there a simple way to check if it is currently playing?
I know in Allegro 4 I used to use voice_get_position() and I would check if it equaled -1 (wasn't currently playing) than I could play it again.
I'm looking at various Allegro 5.1 functions for voice, sample instances etc... and I am not quite sure what I need to do. Right now it's just a simple al_play_sample(), but I get the feeling I need to do a lot more so I can check to see if it is currently playing.
Thread #612596. Printed from Allegro.cc
Oops, asked this once before, I just couldn't find it until now, sorry. :/