|
@@ -682,7 +682,7 @@ const dynamicShowPlaySpeed = (index: number) => {
|
|
|
|
|
|
// 开始播放时,计算mp3的播放倍率
|
|
|
export const initSetPlayRate = () => {
|
|
|
- const item: any = (state.sectionStatus && state.section.length === 2) ? state.sectionFirst || state.section[0] : state.times[state.activeNoteIndex];
|
|
|
+ const item: any = (state.sectionStatus && state.section.length === 2) ? state.section[0] : state.times[state.activeNoteIndex];
|
|
|
if (item && item.measureSpeed) {
|
|
|
const ratio = state.speed / Math.floor(item.measureSpeed)
|
|
|
// state.audiosInstance?.setSpeed(ratio)
|
|
@@ -694,7 +694,11 @@ export const initSetPlayRate = () => {
|
|
|
// 重置播放倍率
|
|
|
export const resetBaseRate = (idx?: number) => {
|
|
|
const index = idx ? idx : 0;
|
|
|
- const currentItem: any = state.times[index];
|
|
|
+ let currentItem: any = state.times[index];
|
|
|
+ // 如果是在预备小节点击原速,需要重置为选段第一小节的速度
|
|
|
+ if (state.section.length === 2 && state.sectionFirst && state.sectionFirst.MeasureNumberXML === currentItem.MeasureNumberXML) {
|
|
|
+ currentItem = state.section[0];
|
|
|
+ }
|
|
|
const currentSpeed = currentItem?.measureSpeed ? currentItem.measureSpeed : state.originSpeed;
|
|
|
console.log('速度2',currentSpeed)
|
|
|
state.speed = currentSpeed
|
|
@@ -1198,6 +1202,10 @@ export const resetSettings = () => {
|
|
|
if (state.isAppPlay) {
|
|
|
audioData.progress = 0;
|
|
|
}
|
|
|
+ showToast({
|
|
|
+ message: "已将所有参数重置到默认状态",
|
|
|
+ position: "top",
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
/** 效验并格式化选段小节 */
|
|
@@ -2143,6 +2151,9 @@ watch(
|
|
|
if(measureNum > rightMeasureNumberXML){
|
|
|
item.querySelector('.vf-custom-bg')?.setAttribute("fill", "transparent")
|
|
|
}
|
|
|
+ if (measureNum >= leftMeasureNumberXML && measureNum <= rightMeasureNumberXML) {
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", "rgba(1, 193, 181, 0.15)")
|
|
|
+ }
|
|
|
// 预备小节
|
|
|
if(state.sectionFirst && measureNum === state.sectionFirst.MeasureNumberXML){
|
|
|
item?.querySelector('.vf-custom-bg')?.setAttribute("fill", "rgba(255, 193, 48, 0.15)")
|