iPhone 4 有两个内置麦克风,一个位于标准位置,另一个位于耳机插孔旁边。我知道这款新麦克风用于降低通话噪音,但它也用于 Facetime、视频、免提通话等。
我有充分的理由希望能够选择使用哪个麦克风进行录音,无论是新麦克风还是旧麦克风,甚至同时使用两者。
有谁知道如何路由 avaudiorecorder,以便我可以选择上述任何正在录制的选项?
提前致谢
最佳答案
我知道这是一个古老的问题,但为了将来的引用,以防其他人正在寻找相同的答案,我将在此处提供一些信息。有一个section in the AVAudioSession documentation这说明从 iOS7 开始,有一种方法可以显式地执行此操作:
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.
在较旧的操作系统中,您只能选择 AVAudioSessionMode
来影响麦克风的选择。
关于iphone - 从 iPhone 4 上的一个或两个麦克风录音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4681175/