Android: carefree playback of looped audio in MediaPlayer

I play an audio file with setLooped turned on in my application, but every time the audio files are bypassed, there is a noticeable, albeit very short gap in the sound playback ... is there any way around this?

+6
android
source share
2 answers

I ran into the same problem and I think you used MP3 or OGG files or some other compressed format. The solution is to use WAV files instead. This can increase the size of your apk, but allows you to work carefree.

+1
source share

I had the same problem and tried to switch from MP3 to WAV. Then the cycle worked without problems in the emulator, but not in my phone. Using OGG files actually made it work on the phone as well. So using .ogg can also be worth a shot, but I really don't understand

0
source share

All Articles