新增挂断后停止接收音频数据(待测试)

This commit is contained in:
Daisy 2024-01-03 15:34:08 +08:00
parent 85484ff4ff
commit 67ee0d018b
2 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,3 @@
import 'dart:convert';
import 'dart:typed_data';
import 'package:flutter/foundation.dart';
import 'package:get/get.dart';
@ -6,7 +5,6 @@ import 'package:star_lock/talk/call/g711.dart';
import 'package:star_lock/talk/call/iFrameInfo.dart';
import '../../tools/eventBusEventManage.dart';
import 'package:flutter_pcm_sound/flutter_pcm_sound.dart';
import 'package:flutter_sound/flutter_sound.dart';
class CallTalk {
static CallTalk? _manager;
@ -152,4 +150,9 @@ class CallTalk {
print("Not enough data in allPcmData.");
}
}
//
void stopPcmSound() {
FlutterPcmSound.stop();
}
}

View File

@ -117,6 +117,7 @@ class CommandUDPReciverManager {
UDPTalkClass().isBeCall = false;
Get.back();
UDPTalkClass().stopLocalAudio();
CallTalk().stopPcmSound();
eventBus.fire(GetUDPStatusRefreshUI(UDPTalkClass().status));
}
break;