FMOD EventInstance doesn't respect cooldown

#1

Using FMOD 1.10.12 in Unity

FMOD.Studio.EventInstance doesn’t seem to be respecting cooldown set in the macro controls.

I am calling FMOD.Studio.EventInstance::start roughly every frame, after initializing it in a start method and the audio is just overlapping and blowing up.

Edit: If it’s not suppose to, is there a way to make it? I need many instances of various audio, but would rather not use 1 emitter per audio file.

I have tested this with both FMODUnity.StudioEventEmitter::Play with an emitter and, FMODUnity.RuntimeManager::PlayOneShot
and they both seem to be properly waiting for cooldown.

I’m not sure if I’m missing something, and advice would be greatly appreciated.

Thanks

0 Likes

#2

Calling start on Event Instance will restart that instance it if it is already playing:

If the instance was already playing then calling this function will restart the event.

https://fmod.com/resources/documentation-api?version=2.0&page=studio-api-eventinstance.html#studio_eventinstance_start

When we restart an Event Instance, the first thing we do is stop the current playing instance, then we figure out if we should start another one in this case no because the cooldown has not elapsed).

Using StudioEventEmitter::Play and RuntimeManager::PlayOneShot will work because they create new event instances rather than reusing the old one. In this case the old Event won’t get stopped and the new one/s won’t actually start until the cooldown time has passed.

0 Likes

#3

That’s unfortunate, I was hoping I could manage most of the reoccuring audio in 1 script with event instances.

Correct me if I’m wrong but, StudioEventEmitter requires attaching the script to the unity game object right? Also PlayOneShot don’t have parameters right, or do global parameters in 2.00 have an effect now?

0 Likes