audiokit

Using MatrixMixer, how to set the upstream source AVAudioFormat


In the documentation for the MatrixMixer it states the following...

In order to be able to use Matrix Mixer, upstream connections will need to have different format then downstream. Downstream connections are determined by output node's channel count. But, for matrix mixer to be able to count input channels correctly, upstream connections need to preserve source number of channels.

This can be done using Node.outputFormat.

Isn't outputFormat a get only property? I haven't found a way of setting the output format using AudioKit for an individual Node. I want to connect an input USB Audio device that has 16 channels (or 8 or 4) to a Matrix Mixer and then use the Matrix Mixer to sub-mix down to two channel mixers.

I have set Settings.audioFormat but that applies to all new Nodes.


Solution

  • A change to set/get the outputFormat on the Mixer and MatrixMixer has been pushed to the main branch as of 23rd Nov 2023.

    I'm not an expert on Swift Package Manager so I cloned the current version of AudioKit onto my local filesystem and built my app using the main branch.