Fixing macOS version API use
This commit is contained in:
parent
1a81aa0ee1
commit
a92df44112
|
@ -911,16 +911,7 @@ 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 (err1 != noErr) {
|
||||
jack_error("Error calling OpenAComponent");
|
||||
printError(err1);
|
||||
goto error;
|
||||
}
|
||||
#else
|
||||
#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);
|
||||
|
@ -929,6 +920,15 @@ int JackCoreAudioAdapter::OpenAUHAL(bool capturing,
|
|||
printError(err1);
|
||||
goto error;
|
||||
}
|
||||
#else
|
||||
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 OpenAComponent");
|
||||
printError(err1);
|
||||
goto error;
|
||||
}
|
||||
#endif
|
||||
|
||||
err1 = AudioUnitInitialize(fAUHAL);
|
||||
|
|
|
@ -1649,16 +1649,7 @@ 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 (err1 != noErr) {
|
||||
jack_error("Error calling OpenAComponent");
|
||||
printError(err1);
|
||||
goto error;
|
||||
}
|
||||
#else
|
||||
#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);
|
||||
|
@ -1667,6 +1658,15 @@ int JackCoreAudioDriver::OpenAUHAL(bool capturing,
|
|||
printError(err1);
|
||||
goto error;
|
||||
}
|
||||
#else
|
||||
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 OpenAComponent");
|
||||
printError(err1);
|
||||
goto error;
|
||||
}
|
||||
#endif
|
||||
|
||||
err1 = AudioUnitInitialize(fAUHAL);
|
||||
|
|
Loading…
Reference in New Issue