Check track is over state?


23-03-2010 17:37:16

Hi Sticky,
I am creating a sound with loop enabled.
So once the sound has started it's continuously play until i call stop function.
Is their a way to check the current status of the sound? (not isStopped() isPlaying functions)
In More Details
The sound is playing in this order {play->stop when the track is over ->playagain->stop when the track is over}
Is their a way to check whther the track is over state in the game loop?


23-03-2010 21:58:28

If I understand you correctly, I've just added a callback facility where you can register a listener object per-sound to be notified of certain events, like stopped, looping, played etc...

Subclass the OgreOggISound::SoundListener class and implement the functions you wish to be notified about, attach using:sound->setListener(listener);

If there are other notifications you require which are currently missing, let me know and I'll see if I can add them for you.