On Saturday 23 June 2007 17:13, Ed Schouten wrote:
> It could be possible that the following patch fixes this. It shouldn't
> be needed, but it could be possible that the ALSA library on your
> machine is so broken that we need to do this. Please let me know whether
> this fixes your issue:
> 
> %%%
> diff --git a/herrie/src/audio_output_alsa.c b/herrie/src/audio_output_alsa.c
> index 396efb5..b7ba04b 100644
> --- a/herrie/src/audio_output_alsa.c
> +++ b/herrie/src/audio_output_alsa.c
> @@ -80,12 +80,11 @@ audio_output_apply_hwparams(void)
>       if (snd_pcm_hw_params_set_channels(devhnd, devparam, channels) != 0)
>               return (-1);
>  
> +     /* XXX: We may be underrun - fix that first. */
> +     snd_pcm_prepare(devhnd);
>       /* Apply values */
>       if (snd_pcm_hw_params(devhnd, devparam) != 0)
>               return (-1);
> -     /* And we're off! */
> -     if (snd_pcm_prepare(devhnd) != 0)
> -             return (-1);
>       
>       return (0);
>  }
> %%%

This patch works for me with alsa-lib 1.0.11. Maybe tomorrow I'll try to
upgrade alsa-lib and do some more tests.

Thanks.

Reply via email to