Hello,
first of all I am new to FMOD so this might be a noob mistake:
I am using FMOD in Unity.
I want to instantiate an event that loops an alarm sound. This is happening in the Start() method of a prefab. This seems to work. The alarm is ringing. Once the player reaches to the alarming device and turns it off, the instance should be stopped immediatley. When I turn it off however, the sound doesn’t stop.
The debug messages are printed out correctly though. What am I doing wrong? Here is my starting and stopping code:
The code you have shown seems fine, it could be simply how StopAlarm() is called in the game. Are you able to get a small Unity project of this happening and send it over for us to test on our end?
Sorry I do not have time to get a Unity project done since we are a very small team with a tight deadline. I fixed it by using the event emitter component instead for now. I’m going to post another solution here once I’ve got time to figure it out.
For some reason I’m having the same problem. I have this looped sound that I stop and you can hear it in the background. I have a registry on Event Instances and after I release them I take the Event Instance out of the registry, so I can see that the registry is empty but the sound can still be heard.
Unity 2020.3.27 FMOD (Unity) 2.01.07 FMOD Studio 2.01.05
Unfortunately I have the same Issue. The FMOD.Studio.STOP_MODE.ALLOWFADEOUT is not working to stop a looping region. Im unsure why. At the moment I had to use a command instrument to stop the loop.