Muting a channel / a track from parameters / scripts causes serious cumilative lags

I see a tiny lag when you mute a playing event instance via parameter automation and whenever from scripts using EventInstance::setVolume(float).

An event has automation controlled by a continuous parameter on volumes for two out of its three tracks. The tracks will either mute or unmute themselves according to the parameter value.
Although muted, the three tracks will eventually play at once. The event also has a loop section where all the tracks are playing.

My game currently controls the event in such ways:

  1. An increase in a parameter will cause the muted tracks to join in, as stated by the automation.
  2. The entire channel ducks when an external sound plays.

Unity integration seems to be having trouble reproducing these effects.

  1. When I trigger this event in the FMOD Events tab, it seems to play fine until I increase the parameter; the tracks that join in lags behind. This issue will resolve itself when the event reaches the end of the loop.

  2. Each time I mute and resume the channel from code, all the tracks lag (nothing seems to connect at the end of the loop seamlessly.) The effect stacks up until the event loops when all the tracks restart. When this ducking happens a lot within a single iteration, the event will have a severe lag.

I also realized that for the issue 2., you could avoid the problem by setting the volume to a small value like 0.01f. I haven’t tested it yet, but it might also be possible to avoid issue 1. by allowing the track to be barely audible (like -75dB.)

Are these the only way to work around this problem?
I’m using FMOD 2.01.00 with Unity 2019.3.4.f1.

You should be able to set the Priority property to high or highest to work around that type of issue. This makes sure that the instruments are loaded and ready to go before they are triggered/unmuted.

Thanks for the reply - that worked. I needed to set the priority to ‘Highest’ - ‘High’ did the trick for the preview in the editor but wasn’t quite enough for Play Mode.