提交代码
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("有蓝牙权限开始扫描");
|
print("有蓝牙权限开始扫描");
|
||||||
startScanAction();
|
startScanAction();
|
||||||
}else{
|
}else{
|
||||||
getMicrophonePermission()
|
getMicrophonePermission().then((value) {
|
||||||
.then((value) {
|
|
||||||
if (value) {
|
if (value) {
|
||||||
// 有权限
|
// 有权限
|
||||||
print("有蓝牙权限开始扫描");
|
print("有蓝牙权限开始扫描");
|
||||||
|
|||||||
@ -65,6 +65,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
|||||||
var saveSignKeyList = changeIntListToStringList(signKeyData);
|
var saveSignKeyList = changeIntListToStringList(signKeyData);
|
||||||
Storage.setStringList(saveBlueSignKey, saveSignKeyList);
|
Storage.setStringList(saveBlueSignKey, saveSignKeyList);
|
||||||
|
|
||||||
|
Storage.setStringList(saveBlueToken, [0, 0, 0, 0]);
|
||||||
// logic.startScanAction();
|
// logic.startScanAction();
|
||||||
|
|
||||||
listeningAnimations();
|
listeningAnimations();
|
||||||
|
|||||||
@ -28,7 +28,7 @@ class CallTalk {
|
|||||||
var growableList;
|
var growableList;
|
||||||
bool getFirstFrame = false; //是否得到了第一帧
|
bool getFirstFrame = false; //是否得到了第一帧
|
||||||
final FlutterSoundPlayer _audioPlayer = FlutterSoundPlayer();
|
final FlutterSoundPlayer _audioPlayer = FlutterSoundPlayer();
|
||||||
Uint8List? allPcmData = Uint8List(0);
|
List<int>? allPcmData = [];
|
||||||
|
|
||||||
CallTalk._init() {
|
CallTalk._init() {
|
||||||
iframe = IframeInfo();
|
iframe = IframeInfo();
|
||||||
@ -58,11 +58,14 @@ class CallTalk {
|
|||||||
print('dinglingling bb.length:${g711Data.length} 音频数据来:$g711Data ');
|
print('dinglingling bb.length:${g711Data.length} 音频数据来:$g711Data ');
|
||||||
Uint8List? pcmBytes = await G711().decodeG711ToPCM(g711Data.toList());
|
Uint8List? pcmBytes = await G711().decodeG711ToPCM(g711Data.toList());
|
||||||
|
|
||||||
|
allPcmData!.addAll(pcmBytes!);
|
||||||
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
|
|
||||||
print('PCM decoded data: $pcmBytes');
|
print('PCM decoded data: $pcmBytes');
|
||||||
|
|
||||||
if (pcmBytes != null) {
|
if (pcmBytes != null) {
|
||||||
_initializeAudioPlayer();
|
_initializeAudioPlayer();
|
||||||
_playRawData(pcmBytes);
|
_playRawData(Uint8List.fromList(allPcmData!));
|
||||||
} else {
|
} else {
|
||||||
print('Error decoding G.711 to PCM');
|
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) {
|
if (dataSize < 4) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// print("appReceiveUDPData:$data");
|
print("appReceiveUDPData:$data");
|
||||||
|
|
||||||
Uint8List data1 = Uint8List.fromList(data);
|
Uint8List data1 = Uint8List.fromList(data);
|
||||||
if (data1.length == 1) {
|
if (data1.length == 1) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user