Commit a954e851 authored by Monty Montgomery's avatar Monty Montgomery
Browse files

Correct non-native endianness handling in OSX plugin.

patch from Kyle McKay <mackyle@gmail.com>


git-svn-id: http://svn.xiph.org/trunk/ao@18868 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 5bc01127
......@@ -241,7 +241,7 @@ int ao_plugin_open(ao_device *device, ao_sample_format *format)
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 @@ int ao_plugin_open(ao_device *device, ao_sample_format *format)
requestedDesc.mFormatFlags |= kAudioFormatFlagIsBigEndian;
break;
}
requestedEndian = requestedDesc.mFormatFlags & kAudioFormatFlagIsBigEndian;
if (format->bits > 8)
requestedDesc.mFormatFlags |= kAudioFormatFlagIsSignedInteger;
......@@ -337,7 +338,7 @@ int ao_plugin_open(ao_device *device, ao_sample_format *format)
return 0;
}
if((requestedDesc.mFormatFlags & kAudioFormatFlagsNativeEndian) !=
kAudioFormatFlagsNativeEndian){
requestedEndian){
aerror("Could not configure output endianness\n");
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment