fade
fun fade(targetVolume: Float = 1.0f, duration: Long, fadeMode: AudioInterpolatorType = AudioInterpolatorType.CUBIC): Boolean
Fade the audio to the specified volume over a specified duration.
Return
true if fade successfully otherwise false. Note: if targetVolume or duration out of range, it will return false.
Parameters
targetVolume
The target volume value range0.0, 1.0.
duration
The duration of the fade (in milliseconds).
fadeMode
The type of interpolation to use for the fade.