Transitions latency when changing parameter

Hi Paalo

We’ve been able to reproduce this issue in a simple example and what I believe is happening when the audio gets stuck on a song is that the calls to set the controlling parameter’s value to zero and then the new song index are landing in the same (asynchronous) FMOD Studio update. API commands are processed at the start of our update, followed by scheduling logic. When two commands to set a parameter’s value are processed in the same update they will both be evaluated before we perform scheduling, so in this case the scheduler never sees the parameter value of zero and never triggers the transition from the playing song to the selection loop, therefore it won’t transition to the new song.

I’ll log a bug for this, in the meantime the best way for you to workaround the issue is to call Studio::System::flushCommands after you’ve set the song parameter to 0 and before you set it to the new song index. This will force the set parameter command to be evaluated, setting the parameter value to 0, and the scheduling logic to be performed, triggering the transition to the selection loop.

Cheers
Derek

1 Like