[vlc-devel] ALSA problems

Grigori Goronzy greg at chown.ath.cx
Wed Jul 21 13:41:18 CEST 2010


On 07/21/2010 01:15 PM, Rémi Denis-Courmont wrote:
> For several years, there have been reports that VLC outputs choppy sound
> with ALSA. Last week end, I managed to reliably trigger the problem. I
> simply had to select an explicit ALSA device as output (i.e. vlc
> --alsa-audio-device hw:0,0), and the audio sample rate is 44100 Hz.
> Interestingly, if I leave the default, the sound is fine. Also, if I force
> the output to 48kHz with --aout-rate 48000, the sound is fine. I get the
> same problem with both "hw:0,0" and "plughw:0,0".
>

Much of audio hardware does not support arbitrary sample rates and lots
of (older) integrated chipsets only support a sample rate of 48 KHz in
hardware. So, software resampling is needed for all other sample rates.
I'm sure the problem is somehow related to that.

VLC should warn if they requested sample rate cannot be used, though...
Have you tried explicitely enabling resampling? This can be done with
snd_pcm_hw_params_set_rate_resample().

Anyway, IIRC using a hw: or plughw: device will always bypass automatic
resampling, so you're pretty much SOL.

Grigori



More information about the vlc-devel mailing list