enableExternalSoundCard method
@detail api
@author zhangyuanyuan.0101
@brief 启用匹配外置声卡的音频处理模式
@param enable
- true: 开启
- false: 不开启(默认)
@return
- 0: 调用成功。
- < 0 : 调用失败。查看 ReturnStatus{@link #ReturnStatus} 获得更多错误说明
@note
- 当采用外接声卡进行音频采集时,建议开启此模式,以获得更好的音质。
- 开启此模式时,仅支持耳机播放。如果需要使用扬声器或者外置音箱播放,关闭此模式。
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}');
}
}