1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added a workaround for a compatibility problem involving old 10.6 AudioUnit hosts.

This commit is contained in:
jules 2015-08-23 19:06:49 +01:00
parent 64f36624ec
commit 2535fc8fcc

View file

@ -58,6 +58,15 @@
// NB: This line added for JUCE, for backwards-compatibility with pre-10.8 frameworks
#define kAudioUnitProperty_NickName ((AudioUnitPropertyID) 54)
// This is for JUCE, added as a workaround for problems in older hosts following an API change.
struct OldHostCallbackInfo
{
void* hostUserData;
HostCallback_GetBeatAndTempo beatAndTempoProc;
HostCallback_GetMusicalTimeLocation musicalTimeLocationProc;
HostCallback_GetTransportState transportStateProc;
};
#if TARGET_OS_MAC && (TARGET_CPU_X86 || TARGET_CPU_X86_64)
// our compiler does ALL floating point with SSE
@ -509,7 +518,7 @@ OSStatus AUBase::DispatchGetPropertyInfo(AudioUnitPropertyID inID,
#if !CA_NO_AU_HOST_CALLBACKS
case kAudioUnitProperty_HostCallbacks:
ca_require(inScope == kAudioUnitScope_Global, InvalidScope);
outDataSize = sizeof(mHostCallbackInfo);
outDataSize = sizeof(OldHostCallbackInfo);
outWritable = true;
break;
#endif
@ -743,7 +752,7 @@ OSStatus AUBase::DispatchGetProperty( AudioUnitPropertyID inID,
#if !CA_NO_AU_HOST_CALLBACKS
case kAudioUnitProperty_HostCallbacks:
memcpy(outData, &mHostCallbackInfo, sizeof(mHostCallbackInfo));
memcpy(outData, &mHostCallbackInfo, sizeof(OldHostCallbackInfo));
break;
#endif
#if !CA_NO_AU_UI_FEATURES