Mercurial > pidgin
changeset 12411:8c339d9f1bb4
[gaim-migrate @ 14718]
Use the glib byte order macros, so we can prune out configure.ac a bit. Also, add a warning in case someone tries to compile this on a machine with an unknown byte ordering. I really don't think that'll happen, but it doesn't hurt to be thorough.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 08 Dec 2005 20:59:49 +0000 |
parents | bc249de5ea02 |
children | a88ca6da0b38 |
files | src/gtksound.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtksound.c Thu Dec 08 20:59:33 2005 +0000 +++ b/src/gtksound.c Thu Dec 08 20:59:49 2005 +0000 @@ -474,14 +474,16 @@ afSetVirtualSampleFormat(file, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, format.bits); -#if __BYTE_ORDER == __BIG_ENDIAN +#if G_BYTE_ORDER == G_BIG_ENDIAN format.byte_format = AO_FMT_BIG; afSetVirtualByteOrder(file, AF_DEFAULT_TRACK, AF_BYTEORDER_BIGENDIAN); -#elif __BYTE_ORDER == __LITTLE_ENDIAN +#elif G_BYTE_ORDER == G_LITTLE_ENDIAN format.byte_format = AO_FMT_LITTLE; afSetVirtualByteOrder(file, AF_DEFAULT_TRACK, AF_BYTEORDER_LITTLEENDIAN); +#else +#warning Unknown endianness #endif bytes_per_frame = format.bits * format.channels / 8;