MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / getDeviceCount

Method getDeviceCount

examples/TinyAudio/RtAudio.cpp:531–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529}
530
531unsigned int RtApiCore ::getDeviceCount(void)
532{
533 // Find out how many audio devices there are, if any.
534 UInt32 dataSize;
535 AudioObjectPropertyAddress propertyAddress = {kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster};
536 OSStatus result = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &propertyAddress, 0, NULL, &dataSize);
537 if (result != noErr)
538 {
539 errorText_ = "RtApiCore::getDeviceCount: OS-X error getting device info!";
540 error(RtAudioError::WARNING);
541 return 0;
542 }
543
544 return dataSize / sizeof(AudioDeviceID);
545}
546
547unsigned int RtApiCore ::getDefaultInputDevice(void)
548{

Callers 1

RtAudioMethod · 0.45

Calls 10

errorFunction · 0.85
getErrorStringFunction · 0.85
strMethod · 0.80
findMethod · 0.45
clearMethod · 0.45
GetCountMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected