Resonance Audio Room & Listener not found

Hello all.

This is more of a report than an actual question, since I seem to have found a way to prevent/fix it, and I though I should share the whole deal with users and personnel alike. Not sure if the source of the problem lies with FMOD, Unity, or Resonance though.

I was trying to run some tests with the Resonance Audio Rooms, when I came across this in the console:

[1st message]
Resonance Audio Listener not found in the FMOD project.
UnityEngine.Debug:LogError(Object)
FmodResonanceAudio:Initialize() (at Assets/Plugins/FMOD/addons/ResonanceAudio/Scripts/FmodResonanceAudio.cs:235)
FmodResonanceAudio:get_ListenerPlugin() (at Assets/Plugins/FMOD/addons/ResonanceAudio/Scripts/FmodResonanceAudio.cs:132)
FmodResonanceAudio:UpdateAudioRoom(FmodResonanceAudioRoom, Boolean) (at Assets/Plugins/FMOD/addons/ResonanceAudio/Scripts/FmodResonanceAudio.cs:49)
FmodResonanceAudioRoom:OnEnable() (at Assets/Plugins/FMOD/addons/ResonanceAudio/Scripts/FmodResonanceAudioRoom.cs:83)

[2nd message]
[FMOD] assert : assertion: ‘mDescription.mDescription->paramdesc[index]->type == FMOD_DSP_PARAMETER_TYPE_DATA’ failed

UnityEngine.Debug:LogError(Object)
FMODUnity.RuntimeManager:DEBUG_CALLBACK(DEBUG_FLAGS, StringWrapper, Int32, StringWrapper, StringWrapper) (at Assets/Plugins/FMOD/src/Runtime/RuntimeManager.cs:28)
FMOD.DSP:FMOD5_DSP_SetParameterData(IntPtr, Int32, IntPtr, UInt32)
FMOD.DSP:setParameterData(Int32, Byte[]) (at Assets/Plugins/FMOD/src/Runtime/wrapper/fmod.cs:3132)
FmodResonanceAudio:UpdateAudioRoom(FmodResonanceAudioRoom, Boolean) (at Assets/Plugins/FMOD/addons/ResonanceAudio/Scripts/FmodResonanceAudio.cs:49)
FmodResonanceAudioRoom:OnEnable() (at Assets/Plugins/FMOD/addons/ResonanceAudio/Scripts/FmodResonanceAudioRoom.cs:83)

[3rd message, repeated every frame]
Same as above, only this time the triggering function was, of course, FmodResonanceAudioRoom:Update().

It seemed to me that, for whatever reason, the code initially thinks that there is no listener in the project (even though there definitely is, and everything sounds as it should apart from the issue with the audio room). I noticed that the script uses the function FmodResonanceAudio.UpdateAudioRoom(this, FmodResonanceAudio.IsListenerInsideRoom(this)); both in the Update function and in the OnEnable function. I commented out line 83 in the Assets/Plugins/FMOD/addons/ResonanceAudio/Scripts/FmodResonanceAudioRoom.cs script, and problem solved, I think because now the listener had time to be visible to the system, before any audio room searched for it for the first time.

P.S.
Unity version 2018.3.9f1
FMOD Studio & Integration version 2.00.03

Thanks for the feedback, we will look into this.

1 Like