In my application I want to playback (user generated) samples and recognize the completion of their output. Apart from possible dependant further events, I at least want to cleanup any specific data for the playback.
System::playSound provides me a channel reference where my sound is played. A channel object provides a callback interface to be able to know when a sound has ended (FMOD_CHANNEL_CALLBACKTYPE_END). It would be good to receive a reference to the sound that was completed as a parameter, but the channel reference itself is also ok (I can search it through my playback specific data list).
But my major problem with this callback is, that it is not issued in case the channel has been lost (because of priority takeover or otherwise).
I’ve tested this by initializing FMOD with only one available channel and start two playbacks in sequence. The end callback is issued only for the second playback and I thus would keep the data for the first forever.
How can I know (for sure) when a sound has ended if not via this callback?
- firefreak asked 11 years ago
- You must login to post comments