Browse Source

feat: 小数点计算精度问题

TIANYONG 4 months ago
parent
commit
3a08d0e104
2 changed files with 2 additions and 2 deletions
  1. 1 1
      osmd-extended
  2. 1 1
      src/state.ts

+ 1 - 1
osmd-extended

@@ -1 +1 @@
-Subproject commit 95bbcad6abcccc18996d0303692417511fbb3f0d
+Subproject commit cefcde4b54cc28228e500ac2dc73194f24e92864

+ 1 - 1
src/state.ts

@@ -830,7 +830,7 @@ export const skipNotePlay = async (itemIndex: number, isStart = false, handType?
     // 非选段模式,点击音符,动态设置右下角的速度
     if (item.measureSpeed && state.section.length < 2) {
       // console.log('速度3')
-      state.speed = state.basePlayRate * item.measureSpeed
+      state.speed = state.basePlayRate * 10000 * item.measureSpeed / 10000
     }
     setAudioCurrentTime(itemTime, itemIndex);
     // 一行谱,点击音符,或者播放完成,需要跳转音符位置