瀏覽代碼

播放倍率bug修改

黄琪勇 7 月之前
父節點
當前提交
2a17798fe1
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/helpers/formateMusic.ts

+ 2 - 1
src/helpers/formateMusic.ts

@@ -690,7 +690,8 @@ export const formatXML = (xml: string, xmlUrl?: string): string => {
 	if (speeds.length === 0) {
 		;(window as any).baseMeasureSpeed = state.originSpeed
 	} else {
-		state.originAudioPlayRate = speeds[0] / state.originSpeed
+		// 当前谱面的速度转为4分音符速度 因为我们速度比例转为4分音符了
+		state.originAudioPlayRate = speedBeatTo({unit:state.speedBeatUnit, speed:speeds[0]}, "1/4") / state.originSpeed
 	}
 	console.log('是否是变速的曲子:',hasVaryingSpeed,speeds)
 	let repeats: any = [];