开发者

Record from either or both microphones on iPhone 4

The iPhone 4 has two built in microphones, one in the standard place and one sitting next to t开发者_运维知识库he headphone jack. I know this new mic is used for noise reduction in calls but it is also used on facetime, videoing, speakerphone calls etc.

I have a valid reason that I want to be able to choose which mic to record from, be it the new one or the old AND even both at same time.

Does anyone know how to route avaudiorecorder so I can choose any of the above options of what is being recorded?

Thanks in advance


I know this is an ancient question, but for future reference in case others are looking for the same answer, I'll put some information here. There is a section in the AVAudioSession documentation that explains that since iOS7, there is a way to do this explicitly:

Using APIs introduced in iOS 7, developers can perform tasks such as locating a port description that represents the built-in microphone, locating specific microphones like the "front", "back" or "bottom", setting your choice of microphone as the preferred data source, setting the built-in microphone port as the preferred input and even selecting a preferred microphone polar pattern if the hardware supports it. See AVAudioSession.h.

In older OS's, you could only choose the AVAudioSessionMode to affect the choice of microphone.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜