We’ve got a map with many (>100) looping events, with about 50 in playing state, 32 of which are real, others - virtual.
Some of the sounds suddenly stop playing without notice.
I have checked that event->stop() is not called. Well, I’ve checked all my “event->” occurances and found that none of these is called when the sound stops.
My guess was that the sound just gets virtual, so I’ve added a debug output every frame showing the number of channels in event’s channelGroup hiearchy. I’ve found out, that when the sound is playing, I have 1 non-virtual channel.
When the sound abruplty stops, the total channel count becomes 0. The traverse shows that an event has a channelGroup, which has one child channelGroup, which in turn has no channelGroups and no channels (when the sound was playing it had channelGroup->channelGroup->1 channel).
What can be the cause of this channel disappearing and how can I fix it?
Upd: Looks like my sound’s real cannel is “stolen” by some other sound which goes from virtual to real. Is it expected that my sound’s channel doesn’t just go to virtual state but completely disappears? Also this sound is quite loud so it shouldn’t be virtualized by other quieter sounds.
I’m still confused about what’s going on.
Upd2: Seems like a multithreading problem inside FMOD. I have updatet to the latest fmod Ex/Designer 4.44.47 and used logging libs and dlls (there were non in my version 4.40.06) - and the problem disappeared! On non-logging 4.44.47 the problem does still reproduce. So I guess that some synchronization is done when logging, which hides a mulithreading error. Or there are other differences in L dlls?