The standalone cpal backend only accepted output configs whose channel count exactly matched the plugin's. Interfaces with a high channel count (e.g. a MOTU UltraLite) don't advertise a stereo config, so a stereo plugin couldn't open them.
This change accepts configs with at least the plugin's channel count and picks the smallest. The plugin's channels are written to the device's first N outputs and the remaining channels are padded with zeros.
Tested on a MOTU UltraLite-mk5 (opens at 22 channels, audio on outputs 1–2) and built-in 2-channel output.
Output always maps to the device's first N channels. A configurable channel offset could be added later.
The standalone cpal backend only accepted output configs whose channel count exactly matched the plugin's. Interfaces with a high channel count (e.g. a MOTU UltraLite) don't advertise a stereo config, so a stereo plugin couldn't open them.
This change accepts configs with at least the plugin's channel count and picks the smallest. The plugin's channels are written to the device's first N outputs and the remaining channels are padded with zeros.
Tested on a MOTU UltraLite-mk5 (opens at 22 channels, audio on outputs 1–2) and built-in 2-channel output.
Output always maps to the device's first N channels. A configurable channel offset could be added later.