# HG changeset patch # User Nathan Walp # Date 1045717227 0 # Node ID b69bbf9b10446a107bc8332e41867bed70652cef # Parent 5ef293db2582f1da65e8df71ceee2b2aea40b109 [gaim-migrate @ 4876] Nathan Conrad pointed out that sounds were in pretty lousy shape on those wacky big-endian monsters. This should take care of that, and not hurt us little-endian guys in the process. Oh, and there was a chance that sound wouldn't get initialized in weird situations. This should fix that. committer: Tailor Script diff -r 5ef293db2582 -r b69bbf9b1044 src/gaimrc.c --- a/src/gaimrc.c Thu Feb 20 01:36:50 2003 +0000 +++ b/src/gaimrc.c Thu Feb 20 05:00:27 2003 +0000 @@ -801,8 +801,10 @@ /* this is where we do bugs and compatibility stuff */ if (!(sound_options & (OPT_SOUND_BEEP | OPT_SOUND_NORMAL | OPT_SOUND_ESD - | OPT_SOUND_ARTS | OPT_SOUND_NAS | OPT_SOUND_CMD))) + | OPT_SOUND_ARTS | OPT_SOUND_NAS | OPT_SOUND_CMD))) { sound_options |= OPT_SOUND_NORMAL; + gaim_sound_change_output_method(); + } if (conv_size.width == 0 && conv_size.height == 0 && diff -r 5ef293db2582 -r b69bbf9b1044 src/sound.c --- a/src/sound.c Thu Feb 20 01:36:50 2003 +0000 +++ b/src/sound.c Thu Feb 20 05:00:27 2003 +0000 @@ -34,6 +34,10 @@ #include #endif +#ifdef HAVE_ENDIAN_H +#include +#endif + #ifdef USE_AO #include #include @@ -229,10 +233,15 @@ afSetVirtualSampleFormat(file, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, format.bits); - if(afGetByteOrder(file, AF_DEFAULT_TRACK) == AF_BYTEORDER_BIGENDIAN) - format.byte_format = AO_FMT_BIG; - else - format.byte_format = AO_FMT_LITTLE; +#if __BYTE_ORDER == __BIG_ENDIAN + format.byte_format = AO_FMT_BIG; + afSetVirtualByteOrder(file, AF_DEFAULT_TRACK, + AF_BYTEORDER_BIGENDIAN); +#elif __BYTE_ORDER == __LITTLE_ENDIAN + format.byte_format = AO_FMT_LITTLE; + afSetVirtualByteOrder(file, AF_DEFAULT_TRACK, + AF_BYTEORDER_LITTLEENDIAN); +#endif bytes_per_frame = format.bits * format.channels / 8;