[MPlayer-dev-eng] [PATCH] ALSA AO, attempt both chunk sizes before failing

Aurelien Jacobs aurel at gnuage.org
Thu Aug 30 22:07:00 CEST 2007


On Thu, 30 Aug 2007 13:50:09 +0200
"Clemens Ladisch" <cladisch at fastmail.net> wrote:

> Andrew Calkin wrote:
> > The attached patch has been sitting in the GeeXboX development tree
> > since antiquity. Basically if it fails to set the period size with one
> > of the values (1024 or 512), then it tries the other before bailing out.
> 
> >  	if ((err = snd_pcm_hw_params_set_period_size_near(alsa_handler, alsa_hwparams, 
> >  							  &chunk_size, NULL)) < 0)
> 
> When it is not possible to set the given period size, this function just
> sets a value that is as near as possible to the given value ("*_near").
> This function fails only if cannot set _any_ value for the period size.

When the patch was initially written, that wasn't the *_near function
which was used. It was snd_pcm_hw_params_set_period_size().
Then the patch was ported to new MPlayer versions without noticing
the change to _near.
So indeed, this patch seems totally useless now (and since a long time).

Aurel



More information about the MPlayer-dev-eng mailing list