We’ve run into an issue where if our emitters have a ADHSR fadeout and our code calls Stop.AllowFadout then subsequently calls Release it fails and the instance and voice use remain. So we end up with voices/instances building up. At least this is what appears to be happening as when we use Stop.Immediate it works as expected.
FMOD.RESULT for the instance release always returns OK but our profiling/debug menu shows the instance count not reducing.
Any one run into this issue?
Unity version - 2020.3.14 FMOD version - 2.01.09
I’ve not been able to replicate this issue. I’ve got Unity to play and release events with and without AHDSR using stop with allowing fadeout and immediately.
Are you able to post the code that you use to stop and release these events?
We’ve got to the bottom of it. We have a SoundRoom system whereby if you’re outside of an specified area but within a sounds sphere collider of a sound tied to that area, the code fades the sound down and pauses it.
When the instance is paused it doesn’t seem to ever release, so to the solution was to manually unpause it when releasing!
Not sure whether this is the intended functionality or a bug.
Thanks for looking into it!
This is by design. An event can only be released when it has come to a complete stop. This prevents events from accidentally being released if a pause menu is brought up or something similar.