开发者

How to resolve pause while Playing .mp3 in loop using MediaPlayer Android?

I am Using this code to play a .mp3 file from "res/raw". The problem is that this is 1 sec file. And I put player.setLooping True, but as the file play then it take time for replay the sound. That seem like a pause in sound. I want to avoid it.

What I want is continuously play the 1sec length file without a pause ever开发者_运维知识库.

MyAppTesting.player = MediaPlayer.create ( getApplicationContext ( ) , R.raw.idle ) ;
MyAppTesting.player.setLooping ( true ) ;
MyAppTesting.player.start ( ) ;


I end-up with a long duration audio instead of 1 sec it now 10 sec. And its look like its not effecting it more. Working good

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜