init method
Initialize sound system
You can enable mono mode by setting isStereo
as false. isStereo
is true as default
mode
decides performance of audio handler. If mode
is LOW_LATENCY
, it can render audio fast, but audio will start stutter if there are too many sounds to be rendered
If mode
is POWER_SAVING
, it can render audio more fluently, but it may require higher performance than LOW_LATENCY
mode
Implementation
Future<void> init({bool isStereo = true, MODE mode = MODE.LOW_LATENCY}) async {
await _channel.invokeMethod("init", {"isStereo" : isStereo, "mode" : mode == MODE.LOW_LATENCY ? 0 : 1});
}