I see a tiny lag when you mute a playing event instance via parameter automation and whenever from scripts using
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:
- An increase in a parameter will cause the muted tracks to join in, as stated by the automation.
- The entire channel ducks when an external sound plays.
Unity integration seems to be having trouble reproducing these effects.
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.
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.