Fading
Last updated
Last updated
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.
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.
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 that explains the differences between the two.
Fading in WebGL will still be framerate-dependent.