FMODWait releases after calling stop, causing warning
Posted: Fri Nov 24, 2023 6:54 pm
I just discovered just how powerful FMODWait is, but only after spending a good 3 hours trying to implement the same thing.
So small nitpick, it would be nice to make it clearer that:
param 1 is a FMOD sample OR a Unity streaming asset path
param 2 is a programmer instrument
But on the real issue, in `SequencerCommandFMODWait.OnDestroy` the event is released/stopped in the wrong order.
protected virtual void OnDestroy()
{
if (state != PLAYBACK_STATE.STOPPED)
{
if (IsVoicePlaying()) eventInstance.stop(STOP_MODE.IMMEDIATE);
eventInstance.release();
}
}
As this link mentions:
https://qa.fmod.com/t/stop-immediate-th ... ty/16738/2
Release should happen before "stop", or fmod studio will emit this warning:
[FMOD] EventInstance::flushReleaseQueue : Event instance has programmer sounds pending release, update thread will be blocked until programmer sounds are released.
So small nitpick, it would be nice to make it clearer that:
param 1 is a FMOD sample OR a Unity streaming asset path
param 2 is a programmer instrument
But on the real issue, in `SequencerCommandFMODWait.OnDestroy` the event is released/stopped in the wrong order.
protected virtual void OnDestroy()
{
if (state != PLAYBACK_STATE.STOPPED)
{
if (IsVoicePlaying()) eventInstance.stop(STOP_MODE.IMMEDIATE);
eventInstance.release();
}
}
As this link mentions:
https://qa.fmod.com/t/stop-immediate-th ... ty/16738/2
Release should happen before "stop", or fmod studio will emit this warning:
[FMOD] EventInstance::flushReleaseQueue : Event instance has programmer sounds pending release, update thread will be blocked until programmer sounds are released.