🎚️Fading
Introduction
Fade In/Out
Fade in and fade out are techniques that make the playback experience smoother and more fluid. In addition to setting these fading for each AudioClip in LibraryManager, you also have APIs like SetVolume()
and SetEffect()
that offer a fadeTime(float value) overload, allowing all changes to appear more natural.
Cross Fade
Crossfading is the technique of smoothly transitioning from one sound to another by gradually decreasing the volume of the first sound while simultaneously increasing the volume of the second.
All fadings are framerate-independent in BroAudio
One of the main reasons BroAudio uses volume control through AudioMixer instead of AudioSource is that AudioMixer is frame rate independent, allowing volume changes to occur more naturally and precisely.
If you're interested, there's an excellent article that explains the differences between the two.
Fading in WebGL will still be framerate-dependent. more details
Last updated