问题
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