安卓:在MediaPlayer的一个环形音频文件的无缝播放环形、音频文件、MediaPlayer

2023-09-05 07:19:15 作者:何必想你

我玩启用音频文件,我的应用程序一个setLooped,但每次的音频文件循环,有一个显着的,虽然很短暂,差距在音频播放......有没有什么办法来解决这个问题?

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?

推荐答案

我只是面临着同样的问题,我猜你一直在使用MP3或OGG文件或其他一些COM pressed格式。的解决方案是使用WAV文件来代替。这可能会增加您的apk大小,但可以让你循环无间隙。

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.