changeset 14903:21f44596f356

do not always request little-endian despite the actual sound format. by Alexander Strange - astrange@ithinksw.com
author nplourde
date Thu, 03 Mar 2005 13:46:54 +0000
parents 6f588a083261
children 978f583606cc
files libao2/ao_macosx.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_macosx.c	Thu Mar 03 13:40:56 2005 +0000
+++ b/libao2/ao_macosx.c	Thu Mar 03 13:46:54 2005 +0000
@@ -40,6 +40,7 @@
 #include <CoreAudio/AudioHardware.h>
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 #include <inttypes.h>
 #include <pthread.h>
 
@@ -314,7 +315,7 @@
 	// unsigned int
 	ao->outputStreamBasicDescription.mFormatFlags=kAudioFormatFlagIsPacked;
     }
-    if(format&AF_FORMAT_BE)
+    if((format&AF_FORMAT_END_MASK)==AF_FORMAT_BE)
 	ao->outputStreamBasicDescription.mFormatFlags|=kAudioFormatFlagIsBigEndian;
 
     ao->outputStreamBasicDescription.mBytesPerPacket=