MCPcopy Create free account
hub / github.com/LabSound/LabSound / getDeviceCount

Method getDeviceCount

src/backends/RtAudio/RtAudio.cpp:607–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607unsigned 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
623unsigned int RtApiCore ::getDefaultInputDevice(void)
624{

Callers 1

RtAudioMethod · 0.45

Calls 4

getErrorStringFunction · 0.85
clearMethod · 0.80
emptyMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected