iOS: 是否可以同时从多个麦克风录音

iOS: Is it possible to record from multiple microphones at the same time

所有最近的 iPhone 都有 2 个以上的麦克风。是否可以同时从所有麦克风录音?如果可能的话,最好的 iOS 音频库是什么(AudioKit、EzAudio、AudioUnits、CoreAudio)? AudioKit 和 EzAudio 中没有提到这个功能。

我在文档中没有看到任何关于多麦克风音频捕获的信息。 They specify that you can choose a specific microphone 但并不是说您可以同时 select 多个。 AVAudioSession 也是一个单例。

貌似at least as of iOS 10,AVCaptureSession也只允许同时输入一个音频或视频。

因为,你可以record stereo audio,你绝对可以同时从多个麦克风录音。此外,由于降噪可能会使用不参与立体声录音的 1+ 麦克风,因此很可能会“录音”或至少同时使用所有麦克风。

不过,我觉得问题的主要症结在于能否同时分别获取各个麦克风的音频输入。正如 Dare 指出的那样,标准 API 不支持这一点。

但是,假设存在从麦克风源(例如top/bottom)到音频通道(left/right)的一对一映射,则存在理论上的解决方案……

只需录制立体声,然后separate out the left/right channels,和中提琴,您可以分别从每个麦克风获取输入。我还没有对此进行测试,但理论上它应该可以工作。

如果您特别想知道哪个通道对应哪个麦克风,您可能需要检查设备方向,并根据设备类型 table 了解麦克风的位置。例如:

if orientation == landscapeLeft && device == iPhoneX {
  print(“the right audio channel source is the Face ID microphone”)
  print(“the left audio channel source is the dock connector microphone”)
} …