diff options
-rw-r--r-- | src/audio_out/audio_alsa_out.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index 5f1823325..a121fe89f 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -26,13 +26,16 @@ * (c) 2001 James Courtier-Dutton <James@superbug.demon.co.uk> * * - * $Id: audio_alsa_out.c,v 1.153 2004/12/27 16:55:39 hadess Exp $ + * $Id: audio_alsa_out.c,v 1.154 2005/07/31 14:39:39 jcdutton Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif +/* TODO: Make ./configure define this */ +// #define HAS_ALSA_1_0_9 + #include <stdio.h> #include <stdarg.h> #include <errno.h> @@ -471,6 +474,10 @@ 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; } +#ifdef HAS_ALSA_1_0_9 + /* Restrict a configuration space to contain only real hardware rates */ + err = snd_pcm_hw_params_set_rate_resample(this->audio_fd, params, 0); +#endif /* set the stream rate [Hz] */ dir=0; err = snd_pcm_hw_params_set_rate_near(this->audio_fd, params, &rate, &dir); |