Clarify buffer_is_valid check
This commit is contained in:
parent
3a9b3281e8
commit
2580953b87
|
@ -2037,6 +2037,7 @@ impl<P: ClapPlugin> Wrapper<P> {
|
|||
{
|
||||
let audio_outputs = &*process.audio_outputs;
|
||||
let num_output_channels = audio_outputs.channel_count as usize;
|
||||
// This ensures that we never feed dangling slices to the wrapped plugin
|
||||
buffer_is_valid = num_output_channels == output_slices.len();
|
||||
nih_debug_assert_eq!(num_output_channels, output_slices.len());
|
||||
|
||||
|
|
|
@ -1302,6 +1302,7 @@ impl<P: Vst3Plugin> IAudioProcessor for Wrapper<P> {
|
|||
|
||||
if !data.outputs.is_null() {
|
||||
let num_output_channels = (*data.outputs).num_channels as usize;
|
||||
// This ensures that we never feed dangling slices to the wrapped plugin
|
||||
buffer_is_valid = num_output_channels == output_slices.len();
|
||||
nih_debug_assert_eq!(num_output_channels, output_slices.len());
|
||||
|
||||
|
|
Loading…
Reference in a new issue