I’m trying to use background music with loop on Android devices. When music restarts there is a small pause both in game and music. I’m using preloadBackgroundMusic, and CocosDenshion::SimpleAudioEngine::getInstance()->playBackgroundMusic(sound,true).
I have tested with wav and mp3 file formats:
Android 2.3.4: just .wav is ok.
Android 2.3.6: .wav and .mp3 are ok.
Android 5.1: .wav and .mp3 are NOT ok.
I would like to known what is the best solution to avoid these lags (.ogg file format?).
The music’s length is less than 1MB and for iOS and Windows Phone 8.1 everything is ok with .wav files.
I have the same problem and .ogg does not solve the issue. I think is an open thing and they are working on it without solution currently but I hope I am mistaken or a patch is released soon.
@alexgg Thanks for your feedback. You are right, .ogg files have same behavior of .wav files on my tests. Now, I’m looking for a workaround to solve this problem.