AVFoundation has serious issued in iOS 16.1 beta 5. None of these issues are seen prior to iOS 16.0 or earlier.
- The following code fails regularly when switching between
AVCaptureMultiCamSession
&AVCaptureSession
. It turns out thatassetWriter.canApply(outputSettings:)
condition is false for no apparent reason.
if assetWriter?.canApply(outputSettings: audioSettings!, forMediaType: AVMediaType.audio) ?? false {
}
I dumped audioSettings dictionary and here it is:
Looks like number of channels in AVAudioSession are 3 and that is the issue. But how did that happen? Probably there is a bug and AVCaptureMultiCamSession
teardown and deallocation is causing some issue.
- Using
AVAssetWriter
inAVCaptureMultiCamSession
, many times no audio is recorded in the video under same audio settings dictionary dumped above. There is audio track in the video but everything is silent it seems. The same code works perfectly in all other iOS versions. I checked that audio sample buffers are indeed vended during recording but it's very likely they are silent buffers.
Is anyone aware of these issues?