How to use the stereo (2 channel) built in microphone in iPhone XS, inside AVAudioSession?

自古美人都是妖i 提交于 2020-05-15 08:41:53

问题


I'm trying to get both channels from the supposedly stereo rear microphone out of the iPhone XS but can only ever see a single channel at various points in the AVAudioSession and AVAudioSessionPortDescription's associated with the rear camera.

I have tried using AVAudioSession APIs like setPreferredInputNumberOfChannels

do {
    try session.setPreferredInputNumberOfChannels(2)
} catch let error {
    debugPrint("\(error)")
}

But get an error: Error Domain=NSOSStatusErrorDomain Code=-50

Has anyone had experience getting a 2 channel built in mic route working?


回答1:


The stereo microphone on the iPhone XS is placed at the bottom on the left side of the lightning connector. The one on the right side of the lightning connector is a noise cancelling microphone. The 2 other microphones are placed next to the front camera and the back camera. But those are only mono microphones. But there is a big BUT when it comes to the bottom stereo microphone. It only records in stereo when using the build in camera app. Voice only in the voice memo app only records in mono. And, the stereo microphone is not compatible with any third party app. It only works when shooting video in the native camera app.



来源:https://stackoverflow.com/questions/56758113/how-to-use-the-stereo-2-channel-built-in-microphone-in-iphone-xs-inside-avaud

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!