| 577 | }; |
| 578 | |
| 579 | RtApiCore::RtApiCore() |
| 580 | { |
| 581 | #if defined(AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER) |
| 582 | // This is a largely undocumented but absolutely necessary |
| 583 | // requirement starting with OS-X 10.6. If not called, queries and |
| 584 | // updates to various audio device properties are not handled |
| 585 | // correctly. |
| 586 | CFRunLoopRef theRunLoop = NULL; |
| 587 | AudioObjectPropertyAddress property = {kAudioHardwarePropertyRunLoop, |
| 588 | kAudioObjectPropertyScopeGlobal, |
| 589 | kAudioObjectPropertyElementMaster}; |
| 590 | OSStatus result = AudioObjectSetPropertyData(kAudioObjectSystemObject, &property, 0, NULL, sizeof(CFRunLoopRef), &theRunLoop); |
| 591 | if (result != noErr) |
| 592 | { |
| 593 | errorText_ = "RtApiCore::RtApiCore: error setting run loop property!"; |
| 594 | error(RtAudioError::WARNING); |
| 595 | } |
| 596 | #endif |
| 597 | } |
| 598 | |
| 599 | RtApiCore ::~RtApiCore() |
| 600 | { |
nothing calls this directly
no outgoing calls
no test coverage detected