From 15029f2439781c5da7ffcdf18e39ea8ea92b17e9 Mon Sep 17 00:00:00 2001 From: David Flater Date: Wed, 1 Feb 2012 03:45:20 +0100 Subject: Remove ALSA resampler bypass In 2005, xine-lib 1.1.1 added the following change: xine-lib (1.1.1) 2005-11-15 * Improve sound quality when using alsa 1.0.9 or above. When playing a 44.1khz stream on a 48khz only capable sound card. It bypasses alsa-lib resampler and uses xine's That made sense when Alsa's resampling was the worst thing ever. But now, if one installs alsa-plugins-1.0.25 and puts this in ~/.asoundrc: defaults.pcm.rate_converter "samplerate_best" Alsa then does markedly better resampling (using libsamplerate) than xine-lib (using its own algorithm). The bypass added in 2005 is therefore preventing the use of a higher-quality algorithm and blocking the ability to tune that algorithm in ~/.asoundrc, and no longer seems to have any redeeming value. --HG-- extra : transplant_source : %AE%96zte%B0%ED%B6C%BC%89%02%1F%05%21%BD%ED%D6%8C6 --- src/audio_out/audio_alsa_out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index af8b4c351..b8cc1a8ca 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -458,7 +458,7 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int this->num_channels, err, snd_strerror(err)); goto close; } -#if SND_LIB_VERSION >= 0x010009 +#if 0 /* Restrict a configuration space to contain only real hardware rates */ err = snd_pcm_hw_params_set_rate_resample(this->audio_fd, params, 0); #endif -- cgit v1.2.3