提交代码
This commit is contained in:
parent
01f5b67375
commit
82b110778d
1
star_lock/.flutter-plugins-dependencies 2
Normal file
1
star_lock/.flutter-plugins-dependencies 2
Normal file
File diff suppressed because one or more lines are too long
@ -633,8 +633,7 @@ class LockDetailLogic extends BaseGetXController{
|
||||
print("有蓝牙权限开始扫描");
|
||||
startScanAction();
|
||||
}else{
|
||||
getMicrophonePermission()
|
||||
.then((value) {
|
||||
getMicrophonePermission().then((value) {
|
||||
if (value) {
|
||||
// 有权限
|
||||
print("有蓝牙权限开始扫描");
|
||||
|
||||
@ -65,6 +65,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
||||
var saveSignKeyList = changeIntListToStringList(signKeyData);
|
||||
Storage.setStringList(saveBlueSignKey, saveSignKeyList);
|
||||
|
||||
Storage.setStringList(saveBlueToken, [0, 0, 0, 0]);
|
||||
// logic.startScanAction();
|
||||
|
||||
listeningAnimations();
|
||||
|
||||
@ -28,7 +28,7 @@ class CallTalk {
|
||||
var growableList;
|
||||
bool getFirstFrame = false; //是否得到了第一帧
|
||||
final FlutterSoundPlayer _audioPlayer = FlutterSoundPlayer();
|
||||
Uint8List? allPcmData = Uint8List(0);
|
||||
List<int>? allPcmData = [];
|
||||
|
||||
CallTalk._init() {
|
||||
iframe = IframeInfo();
|
||||
@ -58,11 +58,14 @@ class CallTalk {
|
||||
print('dinglingling bb.length:${g711Data.length} 音频数据来:$g711Data ');
|
||||
Uint8List? pcmBytes = await G711().decodeG711ToPCM(g711Data.toList());
|
||||
|
||||
allPcmData!.addAll(pcmBytes!);
|
||||
await Future.delayed(const Duration(seconds: 1));
|
||||
|
||||
print('PCM decoded data: $pcmBytes');
|
||||
|
||||
if (pcmBytes != null) {
|
||||
_initializeAudioPlayer();
|
||||
_playRawData(pcmBytes);
|
||||
_playRawData(Uint8List.fromList(allPcmData!));
|
||||
} else {
|
||||
print('Error decoding G.711 to PCM');
|
||||
}
|
||||
@ -163,4 +166,8 @@ class CallTalk {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> stopLocalAudio() async {
|
||||
await _audioPlayer.stopPlayer();
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ class CommandUDPReciverManager {
|
||||
if (dataSize < 4) {
|
||||
return;
|
||||
}
|
||||
// print("appReceiveUDPData:$data");
|
||||
print("appReceiveUDPData:$data");
|
||||
|
||||
Uint8List data1 = Uint8List.fromList(data);
|
||||
if (data1.length == 1) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user