diff --git a/libao2/ao_macosx.c b/libao2/ao_macosx.c index 26e4d20926..b5ad20891f 100644 --- a/libao2/ao_macosx.c +++ b/libao2/ao_macosx.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -314,7 +315,7 @@ static int init(int rate,int channels,int format,int flags) // 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=