[MPlayer-dev-eng] [PATCH] Add audio support for sndio API.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Wed Dec 18 19:09:01 CET 2013
On Wed, Dec 18, 2013 at 10:02:20AM +0100, Alexandre Ratchov wrote:
> + int space;
> +
> + /*
> + * prepare to start; then refill the buffer with the number of bytes
> + * audio_pause() consumed (this will trigger start)
> + */
> + space = par.bufsz * par.pchan * par.bps - delay;
> + delay = 0;
> + if (!sio_start(hdl))
> + mp_msg(MSGT_AO, MSGL_ERR, "ao2: resume: couldn't start\n");
> + mp_ao_resume_refill(&audio_out_sndio, space);
The delay = 0 doesn't look right.
If there is still data in the buffers when we resume, that data will
cause a delay, too, not just the data we refill.
This looks to me like it should cause permanent A-V desync if pausing
only for a very short time (well, until you pause long enough to
completely empty the buffer at least).
It should also result in delay potentially becoming negative.
That is assuming that the sio_stop/sio_start sequence doesn't have
any strange side-effects.
More information about the MPlayer-dev-eng
mailing list