]> Repos - portaudio/commitdiff
macos: consider major version 11
authorPhil Burk <philburk@mobileer.com>
Fri, 5 Feb 2021 18:23:48 +0000 (10:23 -0800)
committerPhil Burk <philburk@mobileer.com>
Thu, 11 Feb 2021 01:11:52 +0000 (17:11 -0800)
Change version logic to allow for major 11 or later.

Partial fix for #492

src/hostapi/coreaudio/pa_mac_core.c

index 402c512f6ab02463f199f98aa8fa397e45dc3b42..2d98a3b472dd97d89103edad7e105836389dc5dd 100644 (file)
@@ -733,7 +733,7 @@ PaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIn
        Gestalt(gestaltSystemVersionMinor, &minor);
        
        // Starting with 10.6 systems, the HAL notification thread is created internally
-       if (major == 10 && minor >= 6) {
+       if ( major > 10 || (major == 10 && minor >= 6) ) {
                CFRunLoopRef theRunLoop = NULL;
                AudioObjectPropertyAddress theAddress = { kAudioHardwarePropertyRunLoop, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
                OSStatus osErr = AudioObjectSetPropertyData (kAudioObjectSystemObject, &theAddress, 0, NULL, sizeof(CFRunLoopRef), &theRunLoop);