I have tried almost every methods but failed to achieve gapless audio playback between looping a single track.
Steps i have tried n failed :
.mp3
.wav
.ogg
using both
setLooping(true)
and setOnCompletionListener
methods but failed.setOnCompletionListener
same failed to loop without gaps.setNextMediaPlayer(nextmp)
it worked, but it merges only two
different or same audio tracks without any gap and stops playing,
But i don't know how to loop it for-ever .Any 1 please help me, Thanks in advance .
Just idea. Make loop between 2 media players. Probably you will need to do extra work when MediaPlayer object compleate playback to prepare for playback again in onCompleation()
.
Disable loop for both MediaPlayer objects.
prevMedia.setNextMediaPlayer(nextmp);
nextmp.setNextMediaPlayer(prevMedia);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With