diff options
author | Max Kellermann <max@duempel.org> | 2011-02-28 00:00:41 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-02-28 00:00:41 +0100 |
commit | ee9c60fad46c1da7c517b84e37a9c4bc41949efd (patch) | |
tree | 245629c6efb4abcdd11f5c9eefff34e1fcc7c4b3 /src | |
parent | e2574848709266dc9b74d588542342062fe562f6 (diff) | |
download | mpd-ee9c60fad46c1da7c517b84e37a9c4bc41949efd.tar.gz mpd-ee9c60fad46c1da7c517b84e37a9c4bc41949efd.tar.xz mpd-ee9c60fad46c1da7c517b84e37a9c4bc41949efd.zip |
output/oss: AFMT_S24_PACKED is little-endian
According to the Solaris dsp manpage, AFMT_S24_PACKED is
little-endian:
http://download.oracle.com/docs/cd/E19963-01/821-1475/6nmf5baot/index.html
The Minix soundcard.h header says the same.
Diffstat (limited to '')
-rw-r--r-- | src/output/oss_plugin.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/output/oss_plugin.c b/src/output/oss_plugin.c index f5ae80e8c..26d674e33 100644 --- a/src/output/oss_plugin.c +++ b/src/output/oss_plugin.c @@ -461,6 +461,12 @@ oss_setup_sample_format(int fd, struct audio_format *audio_format, break; audio_format->format = mpd_format; + +#ifdef AFMT_S24_PACKED + if (oss_format == AFMT_S24_PACKED) + audio_format->reverse_endian = + G_BYTE_ORDER != G_LITTLE_ENDIAN; +#endif return true; case ERROR: @@ -502,6 +508,12 @@ oss_setup_sample_format(int fd, struct audio_format *audio_format, break; audio_format->format = mpd_format; + +#ifdef AFMT_S24_PACKED + if (oss_format == AFMT_S24_PACKED) + audio_format->reverse_endian = + G_BYTE_ORDER != G_LITTLE_ENDIAN; +#endif return true; case ERROR: |