新增挂断后停止接收音频数据(待测试)
This commit is contained in:
parent
85484ff4ff
commit
67ee0d018b
@ -1,4 +1,3 @@
|
|||||||
import 'dart:convert';
|
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:get/get.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 'package:star_lock/talk/call/iFrameInfo.dart';
|
||||||
import '../../tools/eventBusEventManage.dart';
|
import '../../tools/eventBusEventManage.dart';
|
||||||
import 'package:flutter_pcm_sound/flutter_pcm_sound.dart';
|
import 'package:flutter_pcm_sound/flutter_pcm_sound.dart';
|
||||||
import 'package:flutter_sound/flutter_sound.dart';
|
|
||||||
|
|
||||||
class CallTalk {
|
class CallTalk {
|
||||||
static CallTalk? _manager;
|
static CallTalk? _manager;
|
||||||
@ -152,4 +150,9 @@ class CallTalk {
|
|||||||
print("Not enough data in allPcmData.");
|
print("Not enough data in allPcmData.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//停止接收音频数据
|
||||||
|
void stopPcmSound() {
|
||||||
|
FlutterPcmSound.stop();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -117,6 +117,7 @@ class CommandUDPReciverManager {
|
|||||||
UDPTalkClass().isBeCall = false;
|
UDPTalkClass().isBeCall = false;
|
||||||
Get.back();
|
Get.back();
|
||||||
UDPTalkClass().stopLocalAudio();
|
UDPTalkClass().stopLocalAudio();
|
||||||
|
CallTalk().stopPcmSound();
|
||||||
eventBus.fire(GetUDPStatusRefreshUI(UDPTalkClass().status));
|
eventBus.fire(GetUDPStatusRefreshUI(UDPTalkClass().status));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user