From 4247c229ec6557706db03fe9a7d23661a5a0e01c Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 28 Jun 2022 22:18:41 +0200 Subject: [PATCH] Fix in-place pairs for output-only plugins https://github.com/robbert-vdh/clapval reminded me of this. --- src/wrapper/clap/wrapper.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wrapper/clap/wrapper.rs b/src/wrapper/clap/wrapper.rs index bc68e29d..2b512722 100644 --- a/src/wrapper/clap/wrapper.rs +++ b/src/wrapper/clap/wrapper.rs @@ -2289,9 +2289,9 @@ impl Wrapper

{ 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, + (true, true) if has_main_output => num_input_ports, + (false, true) if has_main_input => 0, + _ => CLAP_INVALID_ID, }; let channel_count = match (is_input, is_main_port) {