I use MediaPlayer to playing loop background sounds in our apps. The file is .ogg audio format.
MediaPlayer mp1 = MediaPlayer.create(context, R.raw.track1); mp1.setLooping(true); // setting loop mp1.start();
I notice there is a gap when the audio file loops. How to remove the gap when the audio file replays again? Thank you.
This is a bug in Android OS itself from 2011. issue: https://issuetracker.google.com/issues/36931073
Besides, you can see this: https://stackoverflow.com/questions/26274182/not-able-to-achieve-gapless-audio-looping-so-far-on-android