1
0
Fork 0

Revert "Fix audio port in-place pair indices"

This reverts commit 791dc44650.

This was actually correct, this should use stable indices instead of
list indices.
This commit is contained in:
Robbert van der Helm 2022-06-27 18:33:13 +02:00
parent 791dc44650
commit 05fd7fa075

View file

@ -2286,7 +2286,13 @@ impl<P: ClapPlugin> Wrapper<P> {
} else {
index + num_input_ports
};
let pair_stable_id = if is_main_port { 0 } else { CLAP_INVALID_ID };
let pair_stable_id = match (is_input, is_main_port) {
// Ports are named linearly with inputs coming before outputs, so this is the index of
// the first output port
(true, true) => num_input_ports,
(false, true) => 0,
(_, false) => CLAP_INVALID_ID,
};
let channel_count = match (is_input, is_main_port) {
(true, true) => current_bus_config.num_input_channels,