Browse Source

播放倍率

TIANYONG 2 months ago
parent
commit
ba8c0ca6db
2 changed files with 3 additions and 2 deletions
  1. 2 1
      src/page-instrument/header-top/speed/index.tsx
  2. 1 1
      src/view/music-score/index.tsx

+ 2 - 1
src/page-instrument/header-top/speed/index.tsx

@@ -36,12 +36,13 @@ export default defineComponent({
 			() => speed.value,
 			() => {
 				// handleSetSpeed(speed.value);
-				state.speed = Math.floor(speed.value);
+				state.speed = speed.value
 				// handleSetSpeed(speed.value);
 				if (state.playState === 'paused') {
 					// const currentItem: any = (state.sectionStatus && state.section.length === 2) ? state.sectionFirst || state.section[0] : state.times[state.activeNoteIndex];
 					const currentItem: any = state.times[state.activeNoteIndex];
 					state.basePlayRate = currentItem?.measureSpeed ? state.speed / currentItem.measureSpeed : state.speed / state.originSpeed;
+					// console.log('播放倍率2',state.basePlayRate)
 				}
 			}
 		);

+ 1 - 1
src/view/music-score/index.tsx

@@ -210,7 +210,7 @@ export default defineComponent({
 			const activeMeasureIndex = state.times[state.activeNoteIndex]?.measureListIndex || -1;
 			for (const [first, last] of state.gradual) {
 				if (first && last) {
-					console.log('小节',first.measureIndex,last.measureIndex,activeMeasureIndex)
+					// console.log('小节',first.measureIndex,last.measureIndex,activeMeasureIndex)
 					result = first.measureIndex <= activeMeasureIndex && activeMeasureIndex < last.measureIndex;
 					if (result) {
 						break;