浏览代码

feat: 评测速度倍率

TIANYONG 1 年之前
父节点
当前提交
27622c9c4c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/pages/detail/runtime.ts

+ 1 - 1
src/pages/detail/runtime.ts

@@ -335,7 +335,7 @@ export const changeSpeed = (speed: number, isSave: boolean = true) => {
   state.speed = speed
   state.playIngSpeed = speed
   // 当前的音符
-  const currentItem: any = detailState.times[state.activeIndex];
+  const currentItem: any = (detailState.sectionStatus && detailState.section.length === 2) ? detailState.section[0] : detailState.times[state.activeIndex];
   state.basePlayRate = currentItem?.measureSpeed ? state.speed / currentItem.measureSpeed : state.speed / detailState.baseSpeed;
   if (!detailState.activeDetail) return
   state.audiosInstance?.setSpeed(state.basePlayRate)