From: Andre Noll Date: Sat, 15 Nov 2008 19:26:06 +0000 (+0100) Subject: Fix the osx writer on little endian machines. X-Git-Tag: v0.3.3~34 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=1e858b078e3d7870176fabc0d69eaccf9711bcb3 Fix the osx writer on little endian machines. We have to use kLinearPCMFormatFlagIsBigEndian only of we're on a little endian (intel) system. --- diff --git a/osx_write.c b/osx_write.c index 6001b859..057526e3 100644 --- a/osx_write.c +++ b/osx_write.c @@ -148,6 +148,12 @@ static OSStatus osx_callback(void * inClientData, return 0; } +#ifdef WORDS_BIGENDIAN /* ppc */ +#define ENDIAN_FLAGS kLinearPCMFormatFlagIsBigEndian +#else +#define ENDIAN_FLAGS 0 +#endif + static int osx_write_open(struct writer_node *wn) { struct private_osx_write_data *powd = para_calloc( @@ -195,7 +201,7 @@ static int osx_write_open(struct writer_node *wn) /* flags specific to each format */ format.mFormatFlags = kLinearPCMFormatFlagIsFloat | kLinearPCMFormatFlagIsPacked - | kLinearPCMFormatFlagIsBigEndian; + | ENDIAN_FLAGS; if (!conf->channels_given && wng->channels) powd->channels = *wng->channels; else