[pulseaudio-discuss] VLC, PulseAudio and large tlengths

Tanu Kaskinen tanuk at iki.fi
Sat Aug 20 10:20:27 PDT 2011


On Sat, 2011-08-20 at 19:15 +0300, Rémi Denis-Courmont wrote:
> Le samedi 20 août 2011 18:46:28 Tanu Kaskinen, vous avez écrit :
> > > > VLC currently assumes that a PulseAudio under-run event implies a
> > > > silence/glitch. It uses it as an opportunity to resync the audio
> > > > stream... this is not good if there was no actual under-run :-/
> > > 
> > > Agreed. PulseAudio should not send the underrun message if there is a
> > > possibility that the client can avoid the underrun by sending more data.
> > 
> > Why not? It sounds like you'd want to define "underrun" differently from
> > what it's currently defined as.
> 
> An audio underrun is a situation whereby the next sample is not available by 
> the time that it is needed. That is the One And Only definition.

To me it seems like your definition is compatible with my definition. An
underrun message is sent when there's no audio in the stream buffer when
it's needed by the sink. There just happens to be period of time after
the underrun when a glitch can still be avoided by rewriting the sink
buffer.

> Getting fewer samples that you would ideally wish for, but still enough to 
> work properly is simply not an underrun.

If you think it's against the English dictionary to use the term
"underrun" when the stream buffer runs empty, maybe we should use some
other term then, and declare that Pulseaudio doesn't support underrun
reporting. But in any case, I don't see why a reporting a
non-recoverable underrun would be significantly more important than
reporting a maybe-recoverable underrun. Both cases are unexpected during
normal operation, and the client is advised to consider increasing the
stream buffer size.

> > Currently an underrun means that there was not enough data in the
> > stream buffer to satisfy the sink's request when it wanted to fill its
> > buffer. I'm not saying that the current definition is the best possible,
> 
> > but I don't see anything obviously
> > wrong in it either.
> 
> Then I'm sorry for you. Go get yourself an English dictionary.
> 
> > If VLC assumes that an underrun message means silence/glitch, it's a
> > bug in VLC,
> 
> Are you kidding me? Is this that the level of hypocrisy that I should expect 
> when dealing with PulseAudio?

No, I was not kidding. I didn't think I'd be offensive either, but maybe
I came across as rude. Sorry about that. If the term "underrun" causes
you to do invalid assumptions about Pulseaudio's internal behavior, then
the term may be wrong (which you seem to claim), or the documentation
may be lacking.

-- 
Tanu



More information about the pulseaudio-discuss mailing list