Dynamic channel layouts of an AudioProcessor in an AudioProcessorGraph and AudioProcessorPlayer


#1

I am wondering where/how is the best way to alter the channel layout of each processor in a graph when the audio device changes. At the moment, each processor in the graph returns 2 inputs and 2 outputs from getTotalNumInputChannels/getTotalNumOutputChannels regardless of what devices are connected and what connections I have setup between node channels. I need to adjust the layout for each processor in response to a device change. Thank you in advance.


#2

Any help with this would be greatly appreciated! Thanks.

Anyone?


#3

Bueller? :disappointed:

I am confused about how to set the channel/bus layouts for an AudioProcessorGraph in response to a change in the main io devices. Basically, each of my processors behave differently if there are one, two, or three input channels, and I need to be able to query from within each processor what the current configuration is.


#4

What I have worked out is that I have a changeListenerCallback which is called when the AudioDeviceManager notices a device change. This callback then reconfigures my graph (disconnects all nodes in my AudioProcessor graph, then reconnects them according to the new layout, and calls ‘setPlayConfigDetails(…)’ on each component AudioProcessor - since just calling it on the graph alone doesn’t seem to set it on the processors that are part of the graph). Hopefully this makes sense, and is an okay approach.