如何AudioObjectGetPropertyData在OS X中使用以检索系统输入设备的列表?我目前有以下用于检索全局设备列表的虚拟代码:
AudioDeviceID devices[12];
UInt32 arraySize = sizeof(devices);
AudioObjectPropertyAddress thePropertyAddress = { kAudioHardwarePropertyDevices,
kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster };
AudioObjectGetPropertyData(kAudioObjectSystemObject,
&thePropertyAddress,
0,
NULL,
&arraySize,
&devices);
Run Code Online (Sandbox Code Playgroud)