diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-07-01 13:51:26 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-07-01 13:51:26 +0000 |
commit | 152d605773745cf59f89a3575ed0aed3c8bd5b2e (patch) | |
tree | c9aed4af04b8293b45ed770aba10a87641dc90c7 /src/audio_out/audio_alsa_out.c | |
parent | cd0b9cf91b6b7f14c085c2fc9f564ccfb65203b0 (diff) | |
download | xine-lib-152d605773745cf59f89a3575ed0aed3c8bd5b2e.tar.gz xine-lib-152d605773745cf59f89a3575ed0aed3c8bd5b2e.tar.bz2 |
improved audio resampling for limited featured sound cards (like the ones found in
laptops, supporting only 16 bits, only stereo etc). as added bonus of new "stackable"
conversion scheme fixes resampling for 8 bit streams.
(thanks Damien Clermonté for discussion and ideas)
note1: alsa patch untested.
note2: pass-through untested.
CVS patchset: 2187
CVS date: 2002/07/01 13:51:26
Diffstat (limited to 'src/audio_out/audio_alsa_out.c')
-rw-r--r-- | src/audio_out/audio_alsa_out.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index 4dcf98ae2..0ac30a2e0 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -26,7 +26,7 @@ * (c) 2001 James Courtier-Dutton <James@superbug.demon.co.uk> * * - * $Id: audio_alsa_out.c,v 1.66 2002/07/01 11:45:25 pmhahn Exp $ + * $Id: audio_alsa_out.c,v 1.67 2002/07/01 13:51:26 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -942,7 +942,12 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) { printf ("audio_alsa_out: access type not available"); return NULL; } + this->capabilities = 0; + + if ( !(snd_pcm_hw_params_set_format(this->audio_fd, params, SND_PCM_FORMAT_U8))) + this->capabilities |= AO_CAP_8BITS; + printf ("audio_alsa_out : supported modes are "); if (!(snd_pcm_hw_params_test_channels(this->audio_fd, params, 1))) { this->capabilities |= AO_CAP_MODE_MONO; |