Forráskód Böngészése

fix: midi选段播放问题修复

TIANYONG 1 éve
szülő
commit
4c6adb50f1
3 módosított fájl, 8 hozzáadás és 2 törlés
  1. 2 2
      src/state.ts
  2. 4 0
      src/view/audio-list/index.tsx
  3. 2 0
      src/view/evaluating/index.tsx

+ 2 - 2
src/state.ts

@@ -550,14 +550,14 @@ const handlePlaying = () => {
 
       // if (Math.abs(selectEndItem.endtime - currentTime) < offset_duration) {
         if (currentTime - selectEndItem.endtime > offset_duration) {
-        console.log("选段播放结束");
+        console.log("选段播放结束",state.setting.repeatAutoPlay);
         // 如果为选段评测模式
         if (state.modeType === "evaluating" && state.isSelectMeasureMode) {
           onEnded();
           return;
         }
         // #8698 bug修复
-        if (state.modeType === "practise" && state.sectionStatus && !state.setting.repeatAutoPlay) {
+        if (state.modeType === "practise" && state.sectionStatus) {
           onEnded();
           resetPlaybackToStart();
           return;

+ 4 - 0
src/view/audio-list/index.tsx

@@ -189,6 +189,10 @@ export default defineComponent({
 			// 	console.log('midi结束')
 			// 	onEnded();
 			// }
+			// 选段模式,播放结束
+			if (state.sectionStatus && state.section.length == 2 && currentTime >= state.section) {
+				//
+			}
 		}
 		// midi播放结束回调
 		const midiPlayEnd = (res: any) => {

+ 2 - 0
src/view/evaluating/index.tsx

@@ -457,6 +457,7 @@ export const handleEndEvaluat = (isComplete = false) => {
 	// 结束录音
 	// api_stopRecording();
 	// 结束评测
+	console.log('评测结束1')
 	endEvaluating({
 		musicScoreId: state.examSongId,
 	});
@@ -505,6 +506,7 @@ export const handleCancelEvaluat = () => {
 	cancelEvaluating();
 	// 停止播放
 	handleStopPlay();
+	console.log('评测结束2')
 	endEvaluating({
 		musicScoreId: state.examSongId,
 	});