|
@@ -664,6 +664,8 @@ const handlePlaying = () => {
|
|
|
// #8698 bug修复
|
|
|
if (state.modeType === "practise" && state.sectionStatus) {
|
|
|
onEnded();
|
|
|
+ state.activeNoteIndex = state.sectionFirst ? state.sectionFirst.i : state.section[0].i
|
|
|
+ dynamicShowPlaySpeed(state.activeNoteIndex)
|
|
|
resetPlaybackToStart();
|
|
|
return;
|
|
|
}
|
|
@@ -1032,6 +1034,11 @@ export const handleResetPlay = () => {
|
|
|
export const handleSetSpeed = (speed: number) => {
|
|
|
// setStorageSpeed(state.examSongId, speed);
|
|
|
state.speed = speed;
|
|
|
+ // 当前的音符
|
|
|
+ const currentItem: any = (state.sectionStatus && state.section.length === 2) ? state.sectionFirst || state.section[0] : 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)
|
|
|
};
|
|
|
/** 清除选段状态 */
|
|
|
export const clearSelection = () => {
|