- Home /
Why do AudioMixerSnapshots not crossfade properly when transitioning?
Currently, using TransitionTo to change audio between two mixer snapshots (one with music set to loud and background noise set to silent, the other with music silent and bg loud) seems to create the effect of one snapshots audio fading almost entirely before the second snapshot fades up to replace it.
When the transition is called, both Groups start to fade towards their targets, but they only pass in dB at around ~60dB, so it sounds like there's a period of silence before the snapshot being transitioned to takes up the slack.
The code that the buttons call is as follows:
public void TransToIndividualSnapshot(AudioMixerSnapshot snap)
{
snap.TransitionTo(transitionTime);
}
An example of a correct crossfade is here (Note how the sounds from the transitioning clips fade over and under each other)
Here is my example webplayer demonstrating the problem inside Unity. Select 'Music' after the player has loaded, then move the slider to the far right. Then click 'BG' and notice the dead 'quiet' moment that happens before the background noise fades to target volume (this is NOT desired behavior).
Does anybody know how to achieve 'correct' snapshot crossfade transitions (for example, as seen in the YouTube video linked) within Unity?
Thanks in advance,
--Rev