summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--macosx/coreaudio/JackCoreAudioAdapter.mm18
-rw-r--r--macosx/coreaudio/JackCoreAudioDriver.mm18
2 files changed, 18 insertions, 18 deletions
diff --git a/macosx/coreaudio/JackCoreAudioAdapter.mm b/macosx/coreaudio/JackCoreAudioAdapter.mm
index 2d86e152..2ea8cfbd 100644
--- a/macosx/coreaudio/JackCoreAudioAdapter.mm
+++ b/macosx/coreaudio/JackCoreAudioAdapter.mm
@@ -911,21 +911,21 @@ int JackCoreAudioAdapter::OpenAUHAL(bool capturing,
}
// AUHAL
-#ifdef MAC_OS_X_VERSION_10_5
- ComponentDescription cd = {kAudioUnitType_Output, kAudioUnitSubType_HALOutput, kAudioUnitManufacturer_Apple, 0, 0};
- Component HALOutput = FindNextComponent(NULL, &cd);
- err1 = OpenAComponent(HALOutput, &fAUHAL);
+#if (defined(MAC_OS_X_VERSION_10_5) && (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5))
+ AudioComponentDescription cd = {kAudioUnitType_Output, kAudioUnitSubType_HALOutput, kAudioUnitManufacturer_Apple, 0, 0};
+ AudioComponent HALOutput = AudioComponentFindNext(NULL, &cd);
+ err1 = AudioComponentInstanceNew(HALOutput, &fAUHAL);
if (err1 != noErr) {
- jack_error("Error calling OpenAComponent");
+ jack_error("Error calling AudioComponentInstanceNew");
printError(err1);
goto error;
}
#else
- AudioComponentDescription cd = {kAudioUnitType_Output, kAudioUnitSubType_HALOutput, kAudioUnitManufacturer_Apple, 0, 0};
- AudioComponent HALOutput = AudioComponentFindNext(NULL, &cd);
- err1 = AudioComponentInstanceNew(HALOutput, &fAUHAL);
+ ComponentDescription cd = {kAudioUnitType_Output, kAudioUnitSubType_HALOutput, kAudioUnitManufacturer_Apple, 0, 0};
+ Component HALOutput = FindNextComponent(NULL, &cd);
+ err1 = OpenAComponent(HALOutput, &fAUHAL);
if (err1 != noErr) {
- jack_error("Error calling AudioComponentInstanceNew");
+ jack_error("Error calling OpenAComponent");
printError(err1);
goto error;
}
diff --git a/macosx/coreaudio/JackCoreAudioDriver.mm b/macosx/coreaudio/JackCoreAudioDriver.mm
index 6708e451..5fbaab72 100644
--- a/macosx/coreaudio/JackCoreAudioDriver.mm
+++ b/macosx/coreaudio/JackCoreAudioDriver.mm
@@ -1649,21 +1649,21 @@ int JackCoreAudioDriver::OpenAUHAL(bool capturing,
}
// AUHAL
-#ifdef MAC_OS_X_VERSION_10_5
- ComponentDescription cd = {kAudioUnitType_Output, kAudioUnitSubType_HALOutput, kAudioUnitManufacturer_Apple, 0, 0};
- Component HALOutput = FindNextComponent(NULL, &cd);
- err1 = OpenAComponent(HALOutput, &fAUHAL);
+#if (defined(MAC_OS_X_VERSION_10_5) && (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5))
+ AudioComponentDescription cd = {kAudioUnitType_Output, kAudioUnitSubType_HALOutput, kAudioUnitManufacturer_Apple, 0, 0};
+ AudioComponent HALOutput = AudioComponentFindNext(NULL, &cd);
+ err1 = AudioComponentInstanceNew(HALOutput, &fAUHAL);
if (err1 != noErr) {
- jack_error("Error calling OpenAComponent");
+ jack_error("Error calling AudioComponentInstanceNew");
printError(err1);
goto error;
}
#else
- AudioComponentDescription cd = {kAudioUnitType_Output, kAudioUnitSubType_HALOutput, kAudioUnitManufacturer_Apple, 0, 0};
- AudioComponent HALOutput = AudioComponentFindNext(NULL, &cd);
- err1 = AudioComponentInstanceNew(HALOutput, &fAUHAL);
+ ComponentDescription cd = {kAudioUnitType_Output, kAudioUnitSubType_HALOutput, kAudioUnitManufacturer_Apple, 0, 0};
+ Component HALOutput = FindNextComponent(NULL, &cd);
+ err1 = OpenAComponent(HALOutput, &fAUHAL);
if (err1 != noErr) {
- jack_error("Error calling AudioComponentInstanceNew");
+ jack_error("Error calling OpenAComponent");
printError(err1);
goto error;
}