7
44
Fork
You've already forked nice-plug
22

Open output devices with more channels than the plugin #56

Merged
BillyDM merged 2 commits from PepperBoy/nice-plug:feat/standalone-multichannel-output into main 2026年06月29日 19:16:06 +02:00
Contributor
Copy link

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.

Ideally we should also support interfaces with less output channels than the plugin (i.e. for plugins with multiple outputs or testing and ambisonic plugin on a stereo system).

Ideally we should also support interfaces with less output channels than the plugin (i.e. for plugins with multiple outputs or testing and ambisonic plugin on a stereo system).

Thanks!

Thanks!
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
RustAudio/nice-plug!56
Reference in a new issue
RustAudio/nice-plug
No description provided.
Delete branch "PepperBoy/nice-plug:feat/standalone-multichannel-output"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?