Can't get Fmod to work in my project

I followed the tutorial and tried to play just one music in my project.
I can’t get it to work. Even in a new clean scene
My setup: Unity URP 2020.2.3f1, Fmod studio + unity package 2.01.05 (I did try with 2.01.07, same result)
I get errors in the console:

    [FMOD] Max number of listeners reached : 8.
UnityEngine.Debug:LogWarning (object)
FMODUnity.RuntimeManager:AddListener (FMODUnity.StudioListener) (at Assets/Plugins/FMOD/src/Runtime/RuntimeManager.cs:348)
FMODUnity.StudioListener:OnEnable () (at Assets/Plugins/FMOD/src/Runtime/StudioListener.cs:20)

ArgumentNullException: Value cannot be null.
Parameter name: value
System.RuntimeType.IsEnumDefined (System.Object value) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Enum.IsDefined (System.Type enumType, System.Object value) (at <9577ac7a62ef43179789031239ba8798>:0)
FMODUnity.Platform.GetOutputType () (at Assets/Plugins/FMOD/src/Runtime/Platform.cs:638)
FMODUnity.RuntimeManager.Initialize () (at Assets/Plugins/FMOD/src/Runtime/RuntimeManager.cs:200)
FMODUnity.RuntimeManager.get_Instance () (at Assets/Plugins/FMOD/src/Runtime/RuntimeManager.cs:108)
Rethrow as SystemNotInitializedException: [FMOD] Initialization failed
FMODUnity.RuntimeManager.get_Instance () (at Assets/Plugins/FMOD/src/Runtime/RuntimeManager.cs:117)
FMODUnity.RuntimeManager.get_StudioSystem () (at Assets/Plugins/FMOD/src/Runtime/RuntimeManager.cs:131)
FMODUnity.RuntimeManager.AddListener (FMODUnity.StudioListener listener) (at Assets/Plugins/FMOD/src/Runtime/RuntimeManager.cs:366)
FMODUnity.StudioListener.OnEnable () (at Assets/Plugins/FMOD/src/Runtime/StudioListener.cs:20)

So I tried to test the integration in a new URP project and it works well instantly. No errors and the music plays.
What could cause this? A configuration error? I see that the exception is linked to OUTPUTTYPE in the platforms script.

Thanks in advance for the help

When you say you are getting this error in a new clean scene, can you confirm there is only one camera and only one FMOD Studio Listener component in the whole scene? Are there any custom scripts being run at the start?

1 Like

In my current project, in a new sample scene (the one by default), with 1 camera and only 1 fmod listener.

About custom script I don’t think so, in the sample scene I customized nothing.

If I try in a brand new project it works well.

I found a workaround though: Weird issue with MAX_LISTENERS constant

I’ve tested our Unity integration in Unity 2020.2 and a few older versions but haven’t been able to replicate the issue you found. It might even be a cache issue, but I can’t be certain. I’ll keep an eye out for any other reports of this bug but for the meantime please use the workaround you have found.

Hello! This is happening to me as well. I tried importing FMOD in a big project and I got the same errors. Changing MAX_LISTENERS to 100 worked. I’m using Unity 2019.3.10f1 though.

Do you get the same issue if you try to install the FMOD integration in a blank project (not a blank scene in an existing project)?