We are installing a custom rolloff callback with FMOD_System_Set3DRolloffCallback
We are seeing that if we call FMOD_System_PlaySound more than once for the same FMOD_SOUND object (i.e. to play multiple instances of the same sound at once) we only get the custom rolloff callback called for the channel object that was most recently created. The other instances do not pass through the custom callback at all.
What we see in our audio log is a call to FMOD_System_PlaySound for the first instance (which in the test run returns a channel value of 0FF60025) then we see a call to FMOD_Channel_Set3DAttributes, then FMOD_Channel_Set3DMinMaxDistance then FMOD_Channel_SetPaused to start the sound playing.
Then another call to FMOD_Channel_Set3DAttributes to update the position followed by a call to our callback (which returns 0 as is correct for the way our custom falloff algorithm works).
Then after that we see another call to FMOD_System_PlaySound for the same FMOD_SOUND object (which in the test run returns a channel value of 0FF60029). Then for that channel we see a call to FMOD_Channel_Set3DAttributes, then FMOD_Channel_Set3DMinMaxDistance then FMOD_Channel_SetPaused to start the sound playing. Then another call to FMOD_Channel_Set3DAttributes to update the position followed by a call to our callback (which also returns 0 as is correct for the way our custom falloff algorithm works).
Then we see repeated calls to FMOD_Channel_Set3DAttributes for the first channel then FMOD_Channel_Set3DAttributes for the second channel (the sound in question is the engine sound for a vehicle object and hence its moving all the time, also it is set to loop infinitely) followed by a call to our callback for the second channel only.
Is there something special we have to do to get it to call our callback for all playing instances of a given FMOD_SOUND?
We are using version 1.04.05 of FMOD Studio Programmers API on Windows.
I have been reading the documentation including that for set3DRolloffCallback and FMOD_3D_ROLLOFF_CALLBACK (such little as exists for that) and cant find anything that would indicate we are doing anything wrong.