Hi world.
Maybe, you should fix Cocos2dxMusic.java
see here:
public void playBackgroundMusic(String path, boolean isLoop){
if (mBackgroundMediaPlayer == null){
mBackgroundMediaPlayer = createMediaplayerFromAssets(path);
}
// ...
}
When the first time you play a music, the mBackgroundMediaPlayer is null.
So the condition to create a new MediaPlayer with path which the first music’s path is.
When you stopBackgroundMusic, the mBackgroundMediaPlayer just stop, but not set to null,
At this time, try to play another music, it’s odd now. It’s still play the first music.