解决音乐播放器播放模式为顺序播放时,在播放完所有歌曲后,这时点击播放按钮需要点击两次bug
authorluozheng <1732036298@qq.com>
Sat, 18 Jan 2025 08:14:46 +0000 (16:14 +0800)
committerluozheng <1732036298@qq.com>
Sat, 18 Jan 2025 08:14:46 +0000 (16:14 +0800)
code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersModel.cpp

index b48d4de..705c516 100644 (file)
@@ -387,7 +387,10 @@ void PlayersModel::SequencePlayout()
             SetPlayButtonState(false);
         }
         SetCircleProgress(100); // 100:进度100%
-        index = playersCaseList.Size() - 1;
+        // index = playersCaseList.Size() - 1;
+        index = 0;// 所有歌曲播放完,重置索引从头开始播放
+        AudioManager::GetInstance().DeactivateAudioInterrupt(interrupt);
+        ClearActivateAudioInterrupt();
     }
     NextSong(index);
 }