diff --git a/src/audio/coreaudio/SDL_coreaudio.c b/src/audio/coreaudio/SDL_coreaudio.c --- a/src/audio/coreaudio/SDL_coreaudio.c +++ b/src/audio/coreaudio/SDL_coreaudio.c @@ -406,9 +406,8 @@ AudioUnitSetProperty(this->hidden->audioUnit, kAudioUnitProperty_SetRenderCallback, scope, bus, &callback, sizeof(callback)); - - #if MACOSX_COREAUDIO - CloseComponent(this->hidden->audioUnit); + #if MAC_OS_X_VERSION_MAX_ALLOWED <= 1050 + CloseComponent(this->hidden->audioUnit); #else AudioComponentInstanceDispose(this->hidden->audioUnit); #endif @@ -482,7 +481,7 @@ { OSStatus result = noErr; AURenderCallbackStruct callback; -#if MACOSX_COREAUDIO +#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1050 ComponentDescription desc; Component comp = NULL; #else @@ -507,9 +506,12 @@ #if MACOSX_COREAUDIO desc.componentSubType = kAudioUnitSubType_DefaultOutput; +#else + desc.componentSubType = kAudioUnitSubType_RemoteIO; +#endif +#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1050 comp = FindNextComponent(NULL, &desc); #else - desc.componentSubType = kAudioUnitSubType_RemoteIO; comp = AudioComponentFindNext(NULL, &desc); #endif @@ -519,7 +521,7 @@ } /* Open & initialize the audio unit */ -#if MACOSX_COREAUDIO +#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1050 result = OpenAComponent(comp, &this->hidden->audioUnit); CHECK_RESULT("OpenAComponent"); #else