|
@@ -682,10 +682,6 @@ export const onEnded = () => {
|
|
const dynamicShowPlaySpeed = (index: number, isPlaying?: boolean) => {
|
|
const dynamicShowPlaySpeed = (index: number, isPlaying?: boolean) => {
|
|
//if (!headerColumnHide.value) {
|
|
//if (!headerColumnHide.value) {
|
|
const item: any = state.times[index];
|
|
const item: any = state.times[index];
|
|
- if (state.sectionFirst && state.section.length === 2 && item.MeasureNumberXML === state.sectionFirst.MeasureNumberXML) {
|
|
|
|
- state.speed = Math.floor(state.section[0].measureSpeed * state.basePlayRate) || state.speed
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
if (item && item.measureSpeed ) {
|
|
if (item && item.measureSpeed ) {
|
|
// console.log('速度1',item.measureSpeed)
|
|
// console.log('速度1',item.measureSpeed)
|
|
const newSpeed = Math.floor(state.basePlayRate * item.measureSpeed)
|
|
const newSpeed = Math.floor(state.basePlayRate * item.measureSpeed)
|
|
@@ -704,12 +700,8 @@ export const initSetPlayRate = () => {
|
|
state.isAutoRePlay = false
|
|
state.isAutoRePlay = false
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- let 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.sectionFirst || state.section[0] : state.times[state.activeNoteIndex];
|
|
console.log('播放状态',state.playState)
|
|
console.log('播放状态',state.playState)
|
|
- // 如果是选段,并且不是选段内的第一小节,取当前小节的速度
|
|
|
|
- if (state.sectionStatus && state.section.length === 2 && state.times[state.activeNoteIndex].MeasureNumberXML !== state.section[0].MeasureNumberXML && state.times[state.activeNoteIndex].MeasureNumberXML !== state.sectionFirst?.MeasureNumberXML) {
|
|
|
|
- item = state.times[state.activeNoteIndex];
|
|
|
|
- }
|
|
|
|
if (item && item.measureSpeed) {
|
|
if (item && item.measureSpeed) {
|
|
const ratio = state.speed / Math.floor(item.measureSpeed)
|
|
const ratio = state.speed / Math.floor(item.measureSpeed)
|
|
// state.audiosInstance?.setSpeed(ratio)
|
|
// state.audiosInstance?.setSpeed(ratio)
|
|
@@ -722,10 +714,6 @@ export const initSetPlayRate = () => {
|
|
export const resetBaseRate = (idx?: number) => {
|
|
export const resetBaseRate = (idx?: number) => {
|
|
const index = idx ? idx : 0;
|
|
const index = idx ? idx : 0;
|
|
let 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;
|
|
const currentSpeed = currentItem?.measureSpeed ? currentItem.measureSpeed : state.originSpeed;
|
|
// console.log('速度2',currentSpeed)
|
|
// console.log('速度2',currentSpeed)
|
|
state.speed = currentSpeed
|
|
state.speed = currentSpeed
|
|
@@ -1354,7 +1342,7 @@ export const hanldeDirectSelection = (list: any[]) => {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
state.section = formateSelectMearure(list);
|
|
state.section = formateSelectMearure(list);
|
|
// 选段完成后,需要根据预报小节的速度,设置右下角显示的速度
|
|
// 选段完成后,需要根据预报小节的速度,设置右下角显示的速度
|
|
- 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.sectionFirst || state.section[0] : state.times[state.activeNoteIndex];
|
|
if (currentItem.measureSpeed && query.workRecord === undefined && query.evaluatingRecord === undefined) {
|
|
if (currentItem.measureSpeed && query.workRecord === undefined && query.evaluatingRecord === undefined) {
|
|
handleSetSpeed(currentItem.measureSpeed);
|
|
handleSetSpeed(currentItem.measureSpeed);
|
|
}
|
|
}
|