stopAudioDeviceRecordAndPlayTest method
@detail api
@brief 停止采集本地音频,并开始播放采集到的声音。录音播放完毕后,设备测试流程结束。
调用 startAudioDeviceRecordTest{@link #IRTCAudioDeviceManager#startAudioDeviceRecordTest} 30 s 内调用本接口来停止采集并开始播放此前采集到的声音。
@return 方法调用结果
- 0:方法调用成功
- < 0:方法调用失败
@note 调用本接口开始播放录音后,可以在播放过程中调用 stopAudioDevicePlayTest{@link #IRTCAudioDeviceManager#stopAudioDevicePlayTest} 停止播放。
Implementation
Future<int?> stopAudioDeviceRecordAndPlayTest() async {
$a() => ($instance as $p_a.IRTCAudioDeviceManager)
.stopAudioDeviceRecordAndPlayTest();
$i() => ($instance as $p_i.ByteRTCAudioDeviceManager)
.stopAudioDeviceRecordAndPlayTest();
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}