[xiph-commits] r18868 - trunk/ao/src/plugins/macosx

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Mon Mar 11 00:47:05 PDT 2013


Author: xiphmont
Date: 2013-03-11 00:47:05 -0700 (Mon, 11 Mar 2013)
New Revision: 18868

Modified:
   trunk/ao/src/plugins/macosx/ao_macosx.c
Log:
Correct non-native endianness handling in OSX plugin.
patch from Kyle McKay <mackyle at gmail.com>


Modified: trunk/ao/src/plugins/macosx/ao_macosx.c
===================================================================
--- trunk/ao/src/plugins/macosx/ao_macosx.c	2013-03-09 15:23:48 UTC (rev 18867)
+++ trunk/ao/src/plugins/macosx/ao_macosx.c	2013-03-11 07:47:05 UTC (rev 18868)
@@ -241,7 +241,7 @@
   ComponentDescription desc;
   AudioStreamBasicDescription requestedDesc;
   AURenderCallbackStruct      input;
-  UInt32 i_param_size;
+  UInt32 i_param_size, requestedEndian;
 
   /* Locate the default output audio unit */
   desc.componentType = kAudioUnitType_Output;
@@ -280,6 +280,7 @@
       requestedDesc.mFormatFlags |= kAudioFormatFlagIsBigEndian;
     break;
   }
+  requestedEndian = requestedDesc.mFormatFlags & kAudioFormatFlagIsBigEndian;
   if (format->bits > 8)
     requestedDesc.mFormatFlags |= kAudioFormatFlagIsSignedInteger;
 
@@ -337,7 +338,7 @@
     return 0;
   }
   if((requestedDesc.mFormatFlags & kAudioFormatFlagsNativeEndian) !=
-     kAudioFormatFlagsNativeEndian){
+     requestedEndian){
     aerror("Could not configure output endianness\n");
     return 0;
   }



More information about the commits mailing list