MediaPlayer在启动后有1次滞后

我从http url源创建MediaPlayer对象来播放流音频。 每当对象在3-4秒后开始播放音频时音频已停止,缓冲并再次播放,但只有一次。 比一切都好

代码:

String url = "http://icecast.vgtrk.cdnvideo.ru/vestifm_mp3_192kbps"; 
        audioPlayer = new MediaPlayer();
        audioPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
            @Override
            public void onPrepared(MediaPlayer mp) {
                    mp.start();
            }
        });
        try {
            //setProgressBarPlayer(Constants.ACTION_BUFFERING);
            audioPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
            audioPlayer.setDataSource(url);
            audioPlayer.prepareAsync();
            audioPlayer.setWakeMode(ctx, PowerManager.PARTIAL_WAKE_LOCK);

        } catch (IOException e) {
            e.printStackTrace();
        }

我的LogCat显示如下

  • W / MediaPlayer:info / warning(703,0)
  • W / MediaPlayer:info / warning(701,0)
  • D / audio_hw_primary:disable_audio_route:重置和更新混音器路径:低延迟重放
  • D / audio_hw_primary:disable_snd_device:snd_device(2:扬声器)V / ConfigFetchTask:ConfigFetchTask getDeviceDataVersionInfo():ABFEt1 ...
  • 我/ GoogleURLConnFactory:使用平台SSLCertificateSocketFactory
  • W / MediaPlayer:info / warning(703,0)
  • I / NuPlayer:准备好缓冲区,恢复...
  • W / MediaPlayer:info / warning(702,0)
  • 链接地址: http://www.djcxy.com/p/61391.html

    上一篇: MediaPlayer make 1 lag after start

    下一篇: What does MediaPlayer info/warning (973, 0) mean?