|
@@ -779,10 +779,10 @@ export const skipNotePlay = async (itemIndex: number, isStart = false) => {
|
|
|
* 切换曲谱播放状态
|
|
|
* @param playState 需要切换的状态 play:播放, paused: 暂停
|
|
|
*/
|
|
|
-export const togglePlay = async (playState: "play" | "paused", sourceType?: string) => {
|
|
|
+export const togglePlay = async (playState: "play" | "paused", isForceCLoseToast?:boolean) => {
|
|
|
// 如果mp3资源还在加载中,给出提示
|
|
|
if (!state.isAppPlay && !state.audioDone) {
|
|
|
- if (sourceType !== 'courseware') showToast('音频资源加载中,请稍后')
|
|
|
+ if (!isForceCLoseToast) showToast('音频资源加载中,请稍后')
|
|
|
return
|
|
|
}
|
|
|
// 播放之前 当为评测模式和不为MIDI时候按 是否禁用节拍器 切换音源
|
|
@@ -1293,7 +1293,7 @@ export const handleRessetState = () => {
|
|
|
if (state.modeType === "evaluating") {
|
|
|
handleStartEvaluat();
|
|
|
} else if (state.modeType === "practise") {
|
|
|
- togglePlay("paused");
|
|
|
+ togglePlay("paused", true);
|
|
|
} else if (state.modeType === "follow") {
|
|
|
toggleFollow(false);
|
|
|
}
|
|
@@ -1390,14 +1390,16 @@ function initMusicSource(data: any, tracks: string[], partIndex: number) {
|
|
|
// 总谱渲染
|
|
|
state.isCombineRender = true
|
|
|
state.partListNames = tracks
|
|
|
- banSongObj = musicSheetAccompanimentList.find((item: any) => {
|
|
|
+ // 总谱演唱模式是 范唱
|
|
|
+ fanSongObj = musicSheetAccompanimentList.find((item: any) => {
|
|
|
return item.audioPlayType === "SING"
|
|
|
})
|
|
|
// 先取scoreAudioFileUrl的值
|
|
|
- if(banSongObj?.scoreAudioFileUrl){
|
|
|
- banSongObj.audioFileUrl = banSongObj.scoreAudioFileUrl
|
|
|
- banSongObj.audioBeatMixUrl = banSongObj.scoreAudioBeatMixUrl
|
|
|
+ if(fanSongObj?.scoreAudioFileUrl){
|
|
|
+ fanSongObj.audioFileUrl = fanSongObj.scoreAudioFileUrl
|
|
|
+ fanSongObj.audioBeatMixUrl = fanSongObj.scoreAudioBeatMixUrl
|
|
|
}
|
|
|
+ // 总谱演奏模式是 伴奏
|
|
|
accompanyObj = musicSheetAccompanimentList.find((item: any) => {
|
|
|
return item.audioPlayType === "PLAY"
|
|
|
})
|