All sounds stop playing, when i start 9 instances of a sound effect

I am starting 9 sound effects (EventInstances) in one frame.
This is causing FMOD to stop all sounds currently playing.
Why does this happen and how to prevent it?

Here’s a video of what’s happening. When the explosions start, the background music is gone.

for (int i = 1; i < 10; i++) {
sound->playSFX(SFX_EXPLOSION);
}

Hi Karl,

I’ve tested starting 9 event instances at the same time but it did not prevent any other events from playing.

Could you let me know what the playSFX() function is doing? Could you also check your FMOD Studio project to see if you have any “max instances” on the buses or events in question? Please also take a look for any error messages in the console or debug logger of your game engine.

Thanks,
Richard

1 Like

Hi Richard!

Thanks for your reply.

I am doing this in playSFX:

this->sfxEventDescription[sfxNr]->createInstance(&eventInstance);
eventInstance->start();
eventInstance->release();

It could well be that there are some old instances killed off, but i don’t know why.
I’ve got this setup for my project. Music and SFX are two separate VCAs.

I set “instance stealing” to Off. So no playing instances should be deleted?

I solved the problem with the music stopping by setting the music tracks’ priority to High. SFXs are Medium.

Hi Karl,

Ah yes, it looks like your music track was going virtual for some reason. Setting the priority to be higher than the sfx will ensure this won’t happen again.

The “Off” stealing behaviour means that any existing instances won’t be forcibly removed. It will wait until an event instance has naturally stopped playing before it will allow any new instances to be created/started.

Happy to hear you solved the issue.

Thanks,
Richard

2 Likes

Thanks for the explanation.