Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Gapless playback of a looped audio file in MediaPlayer

Tags:

android

I am playing a setLooped enabled audio file in my app, but every time the audio file loops, there is a noticeable, though very brief, gap in the audio playback... is there any way to get around this?

like image 817
Frank Bozzo Avatar asked Oct 21 '10 22:10

Frank Bozzo


1 Answers

I was just facing the same problem and I guess you have been using MP3 or OGG files or some other compressed format. The solution is to use WAV files instead. This may increase your apk size but lets you loop gapless.

like image 136
Vincent Avatar answered Oct 05 '22 06:10

Vincent