I have just started working with Allegro 5 sounds. I am used to working with Allegro 4, but I am wondering how I would check to see if a sound is currently playing?
I can load and play samples with no problems. I looked over the documentation and it is a little confusing with voices, mixers, sample instances etc...
This is basically what I understand so far...
Now I just read about ALLEGRO_SAMPLE_ID's and understand them. I've had no use for them YET, but I don't see how they could be used to check if a sample is playing yet.
In Allegro 4 I used to use voice_get_position() to check if a sample was playing.
I don't need anything fancy, in my game I'll be playing basic sound samples once, as well as one of two background sample that will be looping. I want to check each background sample (back1 and back2 for example) to see which is playing (only one of the two will be) and stop it from playing if it is then switch to the other.
Is there an easy way to simply check if a sample is playing (say by using the ALLEGRO_SAMPLE_ID)? Or is there something else I need to do?
Thanks in advance, so far I have been very impressed with this version of Allegro as I get time to program with it.