ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

when does audio underrun occur ?

Open NayaneshGupte opened this issue 7 years ago • 5 comments

Documentation for onAudioUnderrun isn't enough to understand when does it occur.

I'm analysing buffering and failure issues in my app and noticed that many times before player gets into buffering state EventLogger has reported audio underrun event. Not sure if buffering is associated with audio underrun but would like to understand in what all cases audio underrun occurs for HLS and DASH streams.

NayaneshGupte avatar Jun 14 '19 07:06 NayaneshGupte

This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Jun 14 '19 07:06 google-oss-bot

For an explanation of the general effect, you could read the Wikipedia article: https://en.wikipedia.org/wiki/Buffer_underrun

And more specifically for ExoPlayer, it's the problem when the AudioSink needs new audio samples to continue playing continuously, but no new buffer has been read yet. You can hear this as a kind of audio stutter. This callback is meant to indicate audio underrun issues during active playback, i.e. when we actually have enough buffer available, but the device/player isn't fast enough to feed in new samples. If the AudioSink runs out of data because we haven't buffered any data, we would expect just the state change to STATE_BUFFERING. In this sense, it's not expected to get this for every change to buffering. How often do you see that? If it's easy to reproduce, can you try to provide an example stream and reproduction steps? So that we can see why this event is triggered and if we should avoid it somehow.

tonihei avatar Jun 14 '19 16:06 tonihei

Thanks @tonihei ! Will dig into more details and will get back to you.

NayaneshGupte avatar Jun 17 '19 07:06 NayaneshGupte

Hey @NayaneshGupte. We need more information to resolve this issue but there hasn't been an update in 14 days. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Jul 04 '19 01:07 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@NayaneshGupte if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Jul 12 '19 01:07 google-oss-bot