|
@@ -685,7 +685,11 @@ const dynamicShowPlaySpeed = (index: number, isPlaying?: boolean) => {
|
|
|
|
|
|
// 开始播放时,计算mp3的播放倍率
|
|
|
export const initSetPlayRate = () => {
|
|
|
- const item: any = (state.sectionStatus && state.section.length === 2) ? state.section[0] : state.times[state.activeNoteIndex];
|
|
|
+ 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) {
|
|
|
+ item = state.times[state.activeNoteIndex];
|
|
|
+ }
|
|
|
if (item && item.measureSpeed) {
|
|
|
const ratio = state.speed / Math.floor(item.measureSpeed)
|
|
|
// state.audiosInstance?.setSpeed(ratio)
|
|
@@ -2308,11 +2312,6 @@ export const resetCursorPosition = () => {
|
|
|
const noteId = state.times[state.activeNoteIndex].id;
|
|
|
const domId = "vf" + noteId;
|
|
|
const currentDot = document.querySelector(`[data-vf=${domId}]`)?.parentElement
|
|
|
- if (currentDot) {
|
|
|
- setTimeout(() => {
|
|
|
- currentDot.classList.add('dotActive')
|
|
|
- }, 0);
|
|
|
- }
|
|
|
currentDot?.classList.add('dotActive')
|
|
|
} else {
|
|
|
const currentActives: HTMLElement[] = Array.from(document.querySelectorAll(".dotActive"));
|