|
@@ -370,6 +370,8 @@ const state = reactive({
|
|
|
needTick: false,
|
|
|
/** 演唱模式是否需要节拍器 */
|
|
|
needSingTick: false,
|
|
|
+ /** 是否能使用节拍器 */
|
|
|
+ isMixBeat: true,
|
|
|
/** 曲谱实例 */
|
|
|
osmd: null as unknown as OpenSheetMusicDisplay,
|
|
|
/**是否是特殊乐谱类型, 主要针对管乐迷 */
|
|
@@ -649,7 +651,7 @@ export const onEnded = () => {
|
|
|
// 根据当前小节动态设置,右上角展示的速度
|
|
|
const dynamicShowPlaySpeed = (index: number) => {
|
|
|
if (!headerColumnHide.value) {
|
|
|
- console.log('动态计算速度')
|
|
|
+ // console.log('动态计算速度')
|
|
|
const item: any = state.times[index];
|
|
|
if (item && item.measureSpeed ) {
|
|
|
// console.log('速度1',item.measureSpeed)
|
|
@@ -1108,9 +1110,12 @@ export const handleResetPlay = () => {
|
|
|
audioData.progress = 0
|
|
|
}
|
|
|
// 如果是作业模式,不还原速度
|
|
|
- if (!query.workRecord) {
|
|
|
- resetBaseRate();
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * #TODO:2024.09.14,业务需求变更,重播不还原用户设置的速度
|
|
|
+ */
|
|
|
+ // if (!query.workRecord) {
|
|
|
+ // resetBaseRate();
|
|
|
+ // }
|
|
|
resetPlaybackToStart();
|
|
|
// 如果是暂停, 直接播放
|
|
|
togglePlay("play");
|
|
@@ -1356,6 +1361,8 @@ const getMusicInfo = async (res: any) => {
|
|
|
state.isScoreRender = res.data?.isScoreRender
|
|
|
// 是否默认显示总谱
|
|
|
state.defaultScoreRender = res.data?.defaultScoreRender
|
|
|
+ // 是否显示节拍器
|
|
|
+ state.isMixBeat = res.data?.isMixBeat
|
|
|
let partIndex = query["part-index"] ? parseInt(query["part-index"]) : -1 // -1为partIndex没有值的时候
|
|
|
// 如果是评测报告,会有默认的分轨index
|
|
|
if (state.isEvaluatReport) {
|
|
@@ -1506,18 +1513,21 @@ function initMusicSource(data: any, tracks: string[], partIndex: number, workRec
|
|
|
state.mingSong = fanSongObj?.solmizationFileUrl
|
|
|
state.mingSongGirl = fanSongObj?.femaleSolmizationFileUrl
|
|
|
}
|
|
|
- Object.assign(state.beatSong, {
|
|
|
- music: musicObj?.audioBeatMixUrl,
|
|
|
- accompany: accompanyObj?.audioBeatMixUrl,
|
|
|
- fanSong: fanSongObj?.audioBeatMixUrl,
|
|
|
- banSong: banSongObj?.audioBeatMixUrl
|
|
|
- })
|
|
|
- // 如果没有男唱名
|
|
|
- if(!fanSongObj?.solmizationBeatUrl){
|
|
|
- state.beatSong.mingSong = fanSongObj?.femaleSolmizationBeatUrl
|
|
|
- }else{
|
|
|
- state.beatSong.mingSong = fanSongObj?.solmizationBeatUrl
|
|
|
- state.beatSong.mingSongGirl = fanSongObj?.femaleSolmizationBeatUrl
|
|
|
+ // 当使用节拍器的时候才加载节拍器音频
|
|
|
+ if(state.isMixBeat) {
|
|
|
+ Object.assign(state.beatSong, {
|
|
|
+ music: musicObj?.audioBeatMixUrl,
|
|
|
+ accompany: accompanyObj?.audioBeatMixUrl,
|
|
|
+ fanSong: fanSongObj?.audioBeatMixUrl,
|
|
|
+ banSong: banSongObj?.audioBeatMixUrl
|
|
|
+ })
|
|
|
+ // 如果没有男唱名
|
|
|
+ if(!fanSongObj?.solmizationBeatUrl){
|
|
|
+ state.beatSong.mingSong = fanSongObj?.femaleSolmizationBeatUrl
|
|
|
+ }else{
|
|
|
+ state.beatSong.mingSong = fanSongObj?.solmizationBeatUrl
|
|
|
+ state.beatSong.mingSongGirl = fanSongObj?.femaleSolmizationBeatUrl
|
|
|
+ }
|
|
|
}
|
|
|
return {
|
|
|
index,
|