From 1e858b078e3d7870176fabc0d69eaccf9711bcb3 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 15 Nov 2008 20:26:06 +0100 Subject: [PATCH] Fix the osx writer on little endian machines. We have to use kLinearPCMFormatFlagIsBigEndian only of we're on a little endian (intel) system. --- osx_write.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.39.2