修复对讲发送录音帧序号不连续的问题
This commit is contained in:
parent
cbdcdab317
commit
b51a53a9bd
@ -202,6 +202,8 @@ class LockMonitoringLogic extends BaseGetXController {
|
|||||||
state.isButtonDisabled.value = true;
|
state.isButtonDisabled.value = true;
|
||||||
try {
|
try {
|
||||||
await state.voiceProcessor?.stop();
|
await state.voiceProcessor?.stop();
|
||||||
|
state.voiceProcessor?.removeFrameListener(_onFrame);
|
||||||
|
state.udpSendDataFrameNumber = 0;
|
||||||
} on PlatformException catch (ex) {
|
} on PlatformException catch (ex) {
|
||||||
state.errorMessage.value = "Failed to stop recorder: $ex";
|
state.errorMessage.value = "Failed to stop recorder: $ex";
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@ -26,7 +26,7 @@ class LockMonitoringState {
|
|||||||
var listAudioData = <int>[].obs; //得到的音频流字节数据
|
var listAudioData = <int>[].obs; //得到的音频流字节数据
|
||||||
|
|
||||||
//录音相关
|
//录音相关
|
||||||
late final VoiceProcessor? voiceProcessor;
|
late VoiceProcessor? voiceProcessor;
|
||||||
var isProcessing = false.obs; //是否正在处理音频数据
|
var isProcessing = false.obs; //是否正在处理音频数据
|
||||||
var isButtonDisabled = false.obs; //是否禁用按钮
|
var isButtonDisabled = false.obs; //是否禁用按钮
|
||||||
final int frameLength = 320; //音视频帧长度为320
|
final int frameLength = 320; //音视频帧长度为320
|
||||||
|
|||||||
@ -151,7 +151,7 @@ class CallTalk {
|
|||||||
FlutterPcmSound.pause();
|
FlutterPcmSound.pause();
|
||||||
FlutterPcmSound.clear();
|
FlutterPcmSound.clear();
|
||||||
FlutterPcmSound.stop();
|
FlutterPcmSound.stop();
|
||||||
print('已停止播放声音');
|
// print('已停止播放声音');
|
||||||
|
|
||||||
iframe = IframeInfo();
|
iframe = IframeInfo();
|
||||||
iframe!.iframeIndex = 0;
|
iframe!.iframeIndex = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user