How to create discrete mono tracks with AVFoundationMBS

Using these settings:

Var recordSetting as new Dictionary

Var n as integer = OSTypeFromStringMBS(AVFoundation.kAudioFormatAppleLossless)
recordSetting.Value(AVFoundationMBS.AVFormatIDKey) = n
recordSetting.Value(AVFoundationMBS.AVSampleRateKey) = 48000.0
recordSetting.Value(AVFoundationMBS.AVNumberOfChannelsKey) = 2
recordSetting.Value(AVFoundationMBS.AVLinearPCMBitDepthKey) = 24
recordSetting.Value(AVFoundationMBS.AVLinearPCMIsBigEndianKey) = false
recordSetting.Value(AVFoundationMBS.AVLinearPCMIsFloatKey) = false

gives me an audiofile with one stereo track.

How can I create an audiofile with two discrete mono tracks?

So convert one stereo track to two tracks with each mono audio?

Not convert, but record from stereo source and save an audiofile with two discrete mono tracks.

Sorry, I don’t know how to do this.

I would suggest looking into AVChannelLayoutKey to define a channel map.
This allows to map channels and helped us in a few cases already.

It could also be required to make two recording, so that each one records one of the channels.

Thank you, Christian.
I’ve already looked at it – but I don’t know how to use it.
Making two recordings is not an option