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?
iOS provides a number of ways to record audio from the built-in microphones, but until now it's been limited to mono audio only. Starting in iOS 14 and iPadOS 14, you can now capture stereo audio using the built-in microphones on supported devices.
Recordings using the built-in microphone are mono, but you can record stereo using an external stereo microphone that works with iPhone.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With