AVCaptureMultiCamSession audio power is very low

The audio samples coming from audio connection added to AVCaptureMultiCamSession are very low power compared to AVCaptureSession. This can be easily seen by printing averagePower of audio channels in sample code of AVMultiCamPip & AVCam and comparing. Why is it so?
Are you aware that different configurations of microphones are used in AVCaptureMultiCamSession compared to AVCaptureSession? A multicam session is also a multi-mic capable session. It allows simultaneous capture of up to 3 audio beams:
  1. Omni-directional audio

  2. Front-facing audio

  3. Rear-facing audio

This differs from AVCaptureSession, in which the audio captured always follows the direction of the camera you're using. My guess would be that you're mistakenly capturing a different beam-form than you're accustomed to get in AVCaptureSession.

All of this behavior is discussed in depth near the end of 2019's Session 249: Introducing Multi-Camera Capture for iOS. https://developer.apple.com/videos/play/wwdc2019/249/

It's also discussed in AVCaptureInput.h, such as in the headerdoc for the "sourceDevicePosition" property (copied below).
Code Block
/*!
 @property sourceDevicePosition
 @abstract
    The AVCaptureDevicePosition of the source device providing input through this port.
 
 @discussion
    All AVCaptureInputPorts contained in an AVCaptureDeviceInput's ports array have the same sourceDevicePosition, which is deviceInput.device.position. When working with microphone input in an AVCaptureMultiCamSession, it is possible to record multiple microphone directions simultaneously, for instance, to record front-facing microphone input to pair with video from the front facing camera, and back-facing microphone input to pair with the video from the back-facing camera. By calling -[AVCaptureDeviceInput portsWithMediaType:sourceDeviceType:sourceDevicePosition:], you may discover additional hidden ports originating from the source audio device. These ports represent individual microphones positioned to pick up audio from one particular direction. Examples follow.
 
        To discover the audio port that captures omnidirectional audio, use [microphoneDeviceInput portsWithMediaType:AVMediaTypeAudio sourceDeviceType:AVCaptureDeviceTypeBuiltInMicrophone sourceDevicePosition:AVCaptureDevicePositionUnspecified].firstObject.
        To discover the audio port that captures front-facing audio, use [microphoneDeviceInput portsWithMediaType:AVMediaTypeAudio sourceDeviceType:AVCaptureDeviceTypeBuiltInMicrophone sourceDevicePosition:AVCaptureDevicePositionFront].firstObject.
        To discover the audio port that captures back-facing audio, use [microphoneDeviceInput portsWithMediaType:AVMediaTypeAudio sourceDeviceType:AVCaptureDeviceTypeBuiltInMicrophone sourceDevicePosition:AVCaptureDevicePositionBack].firstObject.
 */
@property(nonatomic, readonly) AVCaptureDevicePosition sourceDevicePosition API_AVAILABLE(ios(13.0)) SPI_AVAILABLE(macos(10.15)) API_UNAVAILABLE(tvos, watchos);



@bford, I am using AVMultiCamPip sample code as it is which uses front and back ports (not omnidirectional one). I also have sent a sample code to DTS with other AVCaptureMultiCamSession issues for your reference. Can also add few lines of code to the same and resend it for your reference.
AVCaptureMultiCamSession audio power is very low
 
 
Q