| 605 | } |
| 606 | |
| 607 | unsigned int RtApiCore ::getDeviceCount(void) |
| 608 | { |
| 609 | // Find out how many audio devices there are, if any. |
| 610 | UInt32 dataSize; |
| 611 | AudioObjectPropertyAddress propertyAddress = {kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster}; |
| 612 | OSStatus result = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &propertyAddress, 0, NULL, &dataSize); |
| 613 | if (result != noErr) |
| 614 | { |
| 615 | errorText_ = "RtApiCore::getDeviceCount: OS-X error getting device info!"; |
| 616 | error(RtAudioError::WARNING); |
| 617 | return 0; |
| 618 | } |
| 619 | |
| 620 | return dataSize / sizeof(AudioDeviceID); |
| 621 | } |
| 622 | |
| 623 | unsigned int RtApiCore ::getDefaultInputDevice(void) |
| 624 | { |
no test coverage detected