diff options
author | Philipp Hahn <pmhahn@users.sourceforge.net> | 2002-07-31 06:29:08 +0000 |
---|---|---|
committer | Philipp Hahn <pmhahn@users.sourceforge.net> | 2002-07-31 06:29:08 +0000 |
commit | 8fbd45a2e720d5cddef200c17b520be35c601e78 (patch) | |
tree | 4ab7b4015fe5f8fb02b76108c4161191cb3b4069 | |
parent | edd0a2e7fef47c28052af3c53a307f8e76c39c89 (diff) | |
download | xine-lib-8fbd45a2e720d5cddef200c17b520be35c601e78.tar.gz xine-lib-8fbd45a2e720d5cddef200c17b520be35c601e78.tar.bz2 |
Fix endian issue by Bastien Nocera
CVS patchset: 2372
CVS date: 2002/07/31 06:29:08
-rw-r--r-- | src/audio_out/audio_alsa_out.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index c3bfd30c3..fd276ba9d 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.74 2002/07/08 15:16:11 pmhahn Exp $ + * $Id: audio_alsa_out.c,v 1.75 2002/07/31 06:29:08 pmhahn Exp $ */ #ifdef HAVE_CONFIG_H @@ -280,7 +280,13 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int goto __close; } /* set the sample format ([SU]{8,16{LE,BE}})*/ - err = snd_pcm_hw_params_set_format(this->audio_fd, params, bits == 16 ? SND_PCM_FORMAT_S16_LE : SND_PCM_FORMAT_U8); + err = snd_pcm_hw_params_set_format(this->audio_fd, params, bits == 16 ? +#ifdef WORDS_BIGENDIAN + SND_PCM_FORMAT_S16_BE +#else + SND_PCM_FORMAT_S16_LE +#endif + : SND_PCM_FORMAT_U8); if (err < 0) { printf ("audio_alsa_out: sample format non available\n"); goto __close; |