Browse Source

Fixing macOS version API use

tags/v1.9.17
Robert Chin Filipe Coelho <falktx@falktx.com> 4 years ago
parent
commit
a92df44112
2 changed files with 18 additions and 18 deletions
  1. +9
    -9
      macosx/coreaudio/JackCoreAudioAdapter.mm
  2. +9
    -9
      macosx/coreaudio/JackCoreAudioDriver.mm

+ 9
- 9
macosx/coreaudio/JackCoreAudioAdapter.mm View File

@@ -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;
}


+ 9
- 9
macosx/coreaudio/JackCoreAudioDriver.mm View File

@@ -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;
}


Loading…
Cancel
Save