enableExternalSoundCard method
@detail api
@author zhangyuanyuan.0101
@brief Enable the audio process mode for external sound card.
@param enable
- true: enable
- false: disable (by default)
@return
- 0: Success.
- < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details
@note
- When you use external sound card for audio capture, enable this mode for better audio quality.
- When using the mode, you can only use earphones. If you need to use internal or external speaker, disable this mode.
Implementation
Future<int?> enableExternalSoundCard(bool enable) async {
$a() => ($instance as $p_a.RTCEngine).enableExternalSoundCard(enable);
$i() => ($instance as $p_i.ByteRTCEngine).enableExternalSoundCard(enable);
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}