[MPlayer-dev-eng] [PATCH] alsa: use buffer_time_min instead of buffer_time_near

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Sep 29 14:13:15 CEST 2009


On Tue, Sep 29, 2009 at 10:24:26AM +0200, Reimar Döffinger wrote:
> Index: libao2/ao_alsa.c
> ===================================================================
> --- libao2/ao_alsa.c    (revision 29731)
> +++ libao2/ao_alsa.c    (working copy)
> @@ -571,7 +571,7 @@
>        bytes_per_sample *= ao_data.channels;
>        ao_data.bps = ao_data.samplerate * bytes_per_sample;
>  
> -       if ((err = snd_pcm_hw_params_set_buffer_time_near(alsa_handler, alsa_hwparams,
> +       if ((err = snd_pcm_hw_params_set_buffer_time_min(alsa_handler, alsa_hwparams,
>                                                           &alsa_buffer_time, NULL)) < 0)
>           {
>             mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetBufferTimeNear,

Forget this, even my otherwise reasonably working card can't provide
half a second of buffer data, so this fails.
At best we could try _min first and then _near, but maybe it's best to
leave it at that and if it really causes issues getting it fixed in
ALSA.



More information about the MPlayer-dev-eng mailing list