We have a radio application that streams MP3 over HTTP using an instance of the MediaPlayer class. In devices running new Android versions (i.e, Note 3 running Android 4.3), the music plays for about half a second, and then waits (buffers?) for up to 10 seconds, and plays again. I guess this unwanted behavior is due to the increased buffer size of the MediaPlayer in newer Android versions. Since there's no way to set the buffer size, there are few options left:
- Stream Proxy
- AudioTrack + MP3 Decoder
- OpenSL
I have read many posts about those, and concluded that the best way would be using AudioTrack with an MP3 decoder like FFMPEG. However, I am open to suggestions and any guidances since I do not have any knowledge about Android NDK, JNI and FFMPEG...