Answered
0
0

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.
https://www.youtube.com/watch?v=GNEze0japDc

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

  • You must to post comments
Best Answer
0
0

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.
https://imgur.com/a/kEp4Y

I set “instance stealing” to Off. So no playing instances should be deleted?
https://imgur.com/a/PXYV8

I solved the problem with the music stopping by setting the music tracks’ priority to High. SFXs are Medium.
https://imgur.com/a/kdRT1

  • Richard Simms

    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

  • Karl Hofer

    Thanks for the explanation.

  • You must to post comments
1
0

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

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.