选择输入麦克风的Mac音频队列服务? [英] Selecting input mic for Mac Audio Queue Services?

查看:560
本文介绍了选择输入麦克风的Mac音频队列服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用的音频录音和声音分析Mac OS X的音频队列服务API。使用默认麦克风输入工作正常。

I am currently using the Mac OS X Audio Queue Services API for audio recording and sound analysis. Works fine using the default mic input.

如果有多个麦克风插入MAC(USB,耳机插孔等),有没有办法以编程方式枚举并选择话筒要在应用程序中使用音频输入? (例如没有用户发送到系统preferences面板,这可能会影响用户的其他音频应用。)如果是这样,它的API应该用于选择麦克风输入。

If there is more than one microphone plugged into the Mac (USB, headset jack, etc.), is there a way to programmatically enumerate and select which mic is to be used for audio input within an application? (e.g. not have to send the user to the system preferences panel, which may affect a users other audio applications.) If so, which APIs should be used to select the mic input.

推荐答案

要列举可用的输入设备,请参阅我的回答<一个href=\"http://stackoverflow.com/questions/4575408/audioobjectgetpropertydata-to-get-a-list-of-input-devices\">AudioObjectGetPropertyData以获得输入设备的列表。

To enumerate available input devices please see my answer to AudioObjectGetPropertyData to get a list of input devices.

一旦你已经确定的输入设备,你想使用,您可以设置 kAudioQueueProperty_CurrentDevice 属性设备的UID。

Once you've determined the input device you'd like to use, you can set the kAudioQueueProperty_CurrentDevice property to the device's UID.

这篇关于选择输入麦克风的Mac音频队列服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆