fadeGlobalVolume method
Smoothly changes the global volume to the value of to
over specified time
.
Throws SoLoudNotInitializedException if the engine is not initialized.
Implementation
void fadeGlobalVolume(double to, Duration time) {
if (!isInitialized) {
throw const SoLoudNotInitializedException();
}
final error = _controller.soLoudFFI.fadeGlobalVolume(to, time);
if (error != PlayerErrors.noError) {
_log.severe(() => 'fadeGlobalVolume(): $error');
throw SoLoudCppException.fromPlayerError(error);
}
}