I’ve set the FMOD_CHANNEL_CALLBACKTYPE_END callback on a channel.
The function only gets called once or twice initially, even when lots of sounds are starting & stopping. I imagine the callback should be called every time a sound ends.
I’m setting the callback like this:
myChannel->setCallback( FMOD_CHANNEL_CALLBACKTYPE_END, FmodEndSoundCallback, 0 );
And the callback signature looks like this:
FMOD_RESULT F_CALLBACK FmodEndSoundCallback(FMOD_CHANNEL *channel, FMOD_CHANNEL_CALLBACKTYPE type, int command, unsigned int commanddata1, unsigned int commanddata2);
We’re using version 4.03.04.
- justinc asked 11 years ago
But we’re doing both of these things already. Interesting to know that it’s working for you. How are you creating your sounds? We’re using SOFTWARE and CREATECOMPRESSEDSAMPLE – I wonder if the latter could be causing issues.
I’m using CREATECOMPRESEDSAMPLE too along with 2D and OPENMEMORY and everything works just fine…
I’ve just tried to add CREATECOMPRESSEDSAMPLE to all sounds in my game (it was just used for long ones before), and it worked too.
Basically I create the sound, start it paused, set the flags, volume and callback then unpause it.
Please login first to submit.