相关疑难解决方法(0)

AudioObjectGetPropertyData获取输入设备列表

如何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)

macos core-audio

13
推荐指数
3
解决办法
1万
查看次数

标签 统计

core-audio ×1

macos ×1