Browse Source

feat: 速度问题修改

TIANYONG 5 tháng trước cách đây
mục cha
commit
327a859ec6
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      src/state.ts

+ 3 - 1
src/state.ts

@@ -684,6 +684,7 @@ export const onEnded = () => {
 
 // 根据当前小节动态设置,右上角展示的速度
 const dynamicShowPlaySpeed = (index: number, isPlaying?: boolean) => {
+
   //if (!headerColumnHide.value) {
     const item: any = state.times[index];
     if (item && item.measureSpeed ) {
@@ -1184,7 +1185,8 @@ export const handleSetSpeed = (speed: number) => {
   // setStorageSpeed(state.examSongId, speed);
   state.speed = speed;
   // 当前的音符
-  const currentItem: any = (state.sectionStatus && state.section.length === 2) ? state.section[0] : state.times[state.activeNoteIndex];
+  // const currentItem: any = (state.sectionStatus && state.section.length === 2) ? state.section[0] : state.times[state.activeNoteIndex];
+  const currentItem: any = state.times[state.activeNoteIndex];
   state.basePlayRate = currentItem?.measureSpeed ? state.speed / currentItem.measureSpeed : state.speed / state.originSpeed;
   const actualRate = state.originAudioPlayRate * state.basePlayRate;
   console.log('速度设置',speed,'小节计算的倍率',state.basePlayRate,'实际播放倍率',actualRate)