hyzp_ybqx-Commit124:使用AudioPlayer cache优化播放逻辑,解决多次播放后报错无法播放问题

This commit is contained in:
WinUser01
2022-04-23 13:58:18 +08:00
parent fc7b28f460
commit 740d79d412
6 changed files with 39 additions and 30 deletions
+2 -2
View File
@@ -110,7 +110,7 @@ class _LoginPageState extends State<page7_setRemind> {
if (bVoiceRemind) {
print("播放语音提醒");
// AudioCache().play(File('audio/语音提醒.mp3').path); //语音提醒
myPlayMp3(asset: 'audio/语音提醒.mp3');
myPlayVoiceRemind();
}
getListView();
});
@@ -164,7 +164,7 @@ class _LoginPageState extends State<page7_setRemind> {
setRemindTimer(enable: g_bVoiceRemind);
// AudioCache().play(File('audio/yinxiao1064.mp3').path); //音效提醒
myPlayMp3(asset: 'assets/audio/yinxiao1064.mp3'); //音效提醒
myPlayClacks(); //音效提醒
Navigator.pop(context);
},
),