how to change background music between scenes?


I have 2 scenes in my game,each scene has its own background music.
But when I enter a new scene, I called stopBackgroundMusic(scene1.mp3, true); and preload scene2.mp3, and play scene2.mp3. It seems scene2.mp3 has been played multi times, this only happens in real device.

Any suggestions?


On which device it happens? Also try to play scene2.mp3 without preloading (maybe preloading causes playing: if so, it’s a bug).