[vlc-devel] [RFC PATCH 2/2] alsa: implement non-blocking play()

Rémi Denis-Courmont remi at remlab.net
Tue Mar 12 20:48:15 CET 2019


P.S.: it's simple maths, really.

If we neglect drift between RTC and DAC, and assume a fixed period T, then the correct delay until more write space is the next audio tick, at n.T + t0, where n is an integer.

T is known from ALSA PCM configuration. But the initial time t0 (or equivalently, the phase) is not and I don't know any way to observe it other than poll() et al.

Wait less than necessary and you might have no space. Wait more and you risk an underrun.

Le 12 mars 2019 21:20:12 GMT+02:00, "Rémi Denis-Courmont" <remi at remlab.net> a écrit :
>Yeah true but it is still broken like I explained a few days ago. The
>correct way to wait for buffer room is to poll OUT, AFAIK (like was
>done before).
>-- 
>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser
>ma brièveté.

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190312/f8773384/attachment.html>


More information about the vlc-devel mailing list