[vlc-devel] [PATCH] wasapi: use a finer sleep precision
remi at remlab.net
Fri May 22 20:02:24 CEST 2020
Le perjantaina 15. toukokuuta 2020, 9.45.07 EEST Thomas Guillem a écrit :
> On Thu, May 14, 2020, at 17:14, Rémi Denis-Courmont wrote:
> > Le torstaina 14. toukokuuta 2020, 17.09.55 EEST Thomas Guillem a écrit :
> > > Using the device period and the remaining block sample.
> > Doesn't make much sense to me. Could end up with insanely short or worse
> > insanely long waits.
> It could end with short wait indeed. According to my debug, each time a Play
> need to wait, one wait is enough to fill the remaining buffer (So I never
> saw 2 consecutive sleep() from a
I don't think there is much to draw from this, as the block duration stems
from the codec and codec parameters, not the output. And there are no
particular reasons not to support arbitrary duration anyway.
> Before, we always waited for the audio buffer / 2.
That seems correct. The typical recommendation is half or a third, to keep
safely away from buffer underrun, all the while minimizing wakeups and power
> This caused the audio
> decoder to be paused for quite a long time. When woke up, the decoder was
> in "burst" mode and decoded again everything it could until paused again.
Yes, that's exactly how it's supposed to operate, race to idle. Do as much as
possible as rarely as possible.
More information about the vlc-devel