I'm using Resonance Audio plugin on a Unity VR project.
Used versions are :
Unity - 2018.1.2f1
ResonanceAudioForUnity - 1.2.1
SteamVR plugin for Unity - v1.2.3
The issue is spatialization doesn't work when I have too many AudioSources in the scene. About 20 AudioSource components but only 12 playing sounds (according to unity profiler). When it happens, all sounds are played mainly for right ear. AudioListener rotation doesn't change anything after that. But spatialization worked the second before I got too many AudioSources. A really strange thing. When the spatialization issue happens, if I disable some AudioSources which are not playing anything : the spatialization works again. I also tried to remove all optionnal pluggin components as ResonanceAudioListener or ResonanceAudioSource, but nothing changed.
Does anyone has a clue about that ? I understand there could be an AudioSource quantity limit, even if 20 seems pretty low (especially if its not playing anything). But I expected to not hear all sounds, not to have spatialization stucks.
Thanks for your help.
I've updated issue 55 and the other duplicates that I found on Github. 2019.1+ has this fixed. The workaround for earlier versions of Unity is to call .SetSpatialize(false) when not playing a sound on a spatialized audio source and .SetSpatialize(true) prior to playing a sound on a spatialized audio source.