1
0
Fork 0

Catch VST3 parameter flushes for aux-only plugins

This probably shouldn't happen, but you technically can have a plugin
with no main output but with an auxiliary output. Without this check we
would not detect the parameter flush.
This commit is contained in:
Robbert van der Helm 2023-02-26 01:27:03 +01:00
parent 5ed84e5ea4
commit 7f8c1d955d

View file

@ -2128,6 +2128,13 @@ impl<P: ClapPlugin> Wrapper<P> {
(*host_input).channel_count,
buffer.channels() as u32
);
// This could indicate a parameter flush for a plugin with no main input
// but with auxiliary sidechain inputs, since NIH-plug forbids inputs
// and outputs from having 0 channels
if !(*host_input).channel_count == 0 {
buffer_is_valid = false;
}
}
// If the host passes weird data then we need to be very sure that there are
@ -2185,6 +2192,13 @@ impl<P: ClapPlugin> Wrapper<P> {
!(*host_output).channel_count,
buffer.channels() as u32
);
// This could indicate a parameter flush for a plugin with no main
// output but with auxiliary outputs, since NIH-plug forbids inputs and
// outputs from having 0 channels
if !(*host_output).channel_count == 0 {
buffer_is_valid = false;
}
}
// If the host passes weird data then we need to be very sure that there are