Latency when going from one transition region to another and when pause instance

Hello,

I am using Fmod 2.0 with Unity and I am facing a problem with latency. I know that I am not the first one to post in this forum, however, I am still struggeling with it and was not able to fix this. I am still a beginner.

I Fmod I created an event and hocked it up with a parameter in Unity. In my Fmod studio it looks like this:

I have two audio clips with a loop region each. When my parameter is positive, it loops arroung the audio clip on the right, and when the parameter drops to negative, there should be a transition to the clip on the left. This works, however the transtion is not imeediate. There is a delay about 100 to 200 ms. The same problem arises on Fmod 1.10.09 and Fmod 2.00.01.

Another problem which I face is that when I’m in my Unity game I have a script that pauses the game. During the game I am playing sounds and when I pause it, I want to stop the sounds using “instanceReference.SetPaused(true)”. Here I am having the same issue. The sound stops, but also with a delay.

I have seen this post, describing more or less the same problem: Transitions latency when changing parameter
It is said here, that this is due to a bug and I don’t understand the workarround described here.

Any help is very much appreciated, thank you very much in advance for it.
Despite this, I really enjoy working with Fmod and I think it’s agreat tool.

FMOD has to schedule each sample to be played in advance of when it actually plays. When you change the value of a parameter, FMOD has to change which samples are scheduled to play, and it needs a small amount of lead time to do so. This is the source of the latency you are hearing. We have endeavored to minimize it, but certain amount of latency when changing parameter values is expected and unavoidable.

By default, FMOD schedules 8192 samples ahead; at 48kHz, this translates to around 170.7ms of expected latency.

Streaming assets incur around 85.3 ms of additional latency due to the need to buffer the stream. If the affected assets are streaming, setting them to not stream should reduce latency by around that amount.

Hi Joseph,

thank you very much for your explanation and for the hint, that I should switch off “Streaming” of the two assets. I did that and on top of that, I added a crossfade (I don’t know if that’s the correct term) between the two clips and now it sounds so much nicer.

Thanks again and have a good day!