summaryrefslogtreecommitdiff
path: root/macosx
diff options
context:
space:
mode:
authorRobert Chin <robert.chin@gmail.com>2020-12-27 21:45:11 -0800
committerFilipe Coelho <falktx@falktx.com>2020-12-28 20:33:08 +0000
commita92df44112eea6efef02765afbf6e547455a5521 (patch)
tree5e032d18bfa96e2efcc1db9cf5702c4343f2fbcf /macosx
parent1a81aa0ee1130c69b2d8c210c025ad2e0e991cdb (diff)
downloadjack2-a92df44112eea6efef02765afbf6e547455a5521.tar.gz
Fixing macOS version API use
Diffstat (limited to 'macosx')
-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;
}