when does audio underrun occur ?
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.
This issue does not seem to follow the issue template. Make sure you provide all the required information.
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.
Thanks @tonihei ! Will dig into more details and will get back to you.
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!
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.