So far I’ve never had any problem so haven’t thought about this at all,
but suddenly became curious, if calling FMOD_Channel_IsPlaying() after a long period of time can cause any problem, or at least return a wrong value when the sound is already stopped.
When FMOD_System_Init() is called, requested numbers of channels will be created in FMOD_SYSTEM. And when FMOD_System_PlaySound() is called, it’ll work just like FMOD Ex’s FMOD_CHANNEL_FREE, so a pointer to a free channel will be returned.
When no channels are available, channel stealing will occur, stopping one of the sounds whose priority is the lowest.
This is what I know.
So, I think channel related functions can’t guarantee their behavior 100%, even though most of the time this won’t be any problem at all with enough channels and good code.
FMOD_Channel_IsPlaying() may return TRUE if some other sound is reusing the same channel.
FMOD_Channel_SetVolume() may affect the other sound too after reaching the end or calling FMOD_Channel_Stop().
Is my theory wrong?