|
@@ -226,7 +226,9 @@ export default defineComponent({
|
|
|
/** 连接websocket */
|
|
|
const handleConnect = async () => {
|
|
|
const behaviorId = localStorage.getItem("behaviorId") || localStorage.getItem("BEHAVIORID") || undefined;
|
|
|
- const rate = state.speed / state.originSpeed;
|
|
|
+ let rate = state.speed / state.originSpeed;
|
|
|
+ rate = parseFloat(rate.toFixed(2));
|
|
|
+ console.log('速度比例',rate,'速度',state.speed)
|
|
|
calculateInfo = formatTimes()
|
|
|
const content = {
|
|
|
musicXmlInfos: calculateInfo.datas,
|
|
@@ -245,6 +247,7 @@ export default defineComponent({
|
|
|
// beatLength: Math.round((state.fixtime * 1000) / rate),
|
|
|
beatLength: actualBeatLength,
|
|
|
evaluationCriteria: state.evaluationStandard,
|
|
|
+ speedRate: rate, // 播放倍率
|
|
|
};
|
|
|
await connectWebsocket(content);
|
|
|
// state.playSource = "music";
|
|
@@ -258,12 +261,15 @@ export default defineComponent({
|
|
|
resetPlaybackToStart()
|
|
|
return;
|
|
|
} else if (evaluatingData.resultData?.recordIdStr || evaluatingData.resultData?.recordId) {
|
|
|
+ let rate = state.speed / state.originSpeed;
|
|
|
+ rate = parseFloat(rate.toFixed(2));
|
|
|
// 上传云端
|
|
|
// evaluatModel.evaluatUpdateAudio = true;
|
|
|
api_openAdjustRecording({
|
|
|
recordId: evaluatingData.resultData?.recordIdStr || evaluatingData.resultData?.recordId,
|
|
|
title: state.examSongName || "曲谱演奏",
|
|
|
coverImg: state.coverImg,
|
|
|
+ speedRate: rate, // 播放倍率
|
|
|
});
|
|
|
return;
|
|
|
}
|