Browse Source

fix: 选段速度修改

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

+ 2 - 1
src/state.ts

@@ -687,7 +687,8 @@ const dynamicShowPlaySpeed = (index: number, isPlaying?: boolean) => {
 export const initSetPlayRate = () => {
   let item: any = (state.sectionStatus && state.section.length === 2) ? state.section[0] : state.times[state.activeNoteIndex];
   console.log('播放状态',state.playState)
-  if (state.playState === 'paused' && state.sectionStatus && state.section.length === 2 && state.times[state.activeNoteIndex].MeasureNumberXML !== state.section[0].MeasureNumberXML) {
+  // 如果是选段,并且不是选段内的第一小节,取当前小节的速度
+  if (state.sectionStatus && state.section.length === 2 && state.times[state.activeNoteIndex].MeasureNumberXML !== state.section[0].MeasureNumberXML) {
     item = state.times[state.activeNoteIndex];
   }
   if (item && item.measureSpeed) {