|
@@ -127,7 +127,7 @@ export const detectTheNumberOfSoundSources = () => {
|
|
|
/** 切换节拍器音源 */
|
|
|
export const changeSongSourceByBate = (isDisBate:boolean) => {
|
|
|
// isDisBate 为true 切换到不带节拍的,为false 切换到带节拍的
|
|
|
- if(audioData.songEle && audioData.backgroundEle){
|
|
|
+ if(audioData.songCollection.songEle && audioData.songCollection.backgroundEle && audioData.songCollection.beatSongEle && audioData.songCollection.bateBackgroundEle){
|
|
|
const songEleCurrentTime = audioData.songEle.currentTime
|
|
|
const backgroundEleCurrentTime = audioData.backgroundEle.currentTime
|
|
|
console.log("当前音乐时间:",songEleCurrentTime,backgroundEleCurrentTime)
|