Add checks for auxiliary output channel counts
Apparently this was missing.
This commit is contained in:
parent
9eaf375f6b
commit
5ed84e5ea4
|
@ -2173,6 +2173,7 @@ impl<P: ClapPlugin> Wrapper<P> {
|
|||
|| process.audio_outputs.is_null()
|
||||
|| (*host_output).data32.is_null()
|
||||
|| buffer.channels() == 0
|
||||
|| (*host_output).channel_count != buffer.channels() as u32
|
||||
{
|
||||
nih_debug_assert!(host_output_idx < process.audio_outputs_count as usize);
|
||||
nih_debug_assert!(!process.audio_outputs.is_null());
|
||||
|
@ -2180,6 +2181,10 @@ impl<P: ClapPlugin> Wrapper<P> {
|
|||
&& host_output_idx < process.audio_outputs_count as usize
|
||||
{
|
||||
nih_debug_assert!(!(*host_output).data32.is_null());
|
||||
nih_debug_assert_eq!(
|
||||
!(*host_output).channel_count,
|
||||
buffer.channels() as u32
|
||||
);
|
||||
}
|
||||
|
||||
// If the host passes weird data then we need to be very sure that there are
|
||||
|
|
|
@ -1440,11 +1440,16 @@ impl<P: Vst3Plugin> IAudioProcessor for Wrapper<P> {
|
|||
|| data.outputs.is_null()
|
||||
|| (*host_output).buffers.is_null()
|
||||
|| buffer.channels() == 0
|
||||
|| (*host_output).num_channels != buffer.channels() as i32
|
||||
{
|
||||
nih_debug_assert!(host_output_idx < data.num_outputs as usize);
|
||||
nih_debug_assert!(!data.outputs.is_null());
|
||||
if !data.outputs.is_null() && host_output_idx < data.num_outputs as usize {
|
||||
nih_debug_assert!(!(*host_output).buffers.is_null());
|
||||
nih_debug_assert!(
|
||||
!(*host_output).num_channels == 0
|
||||
|| !(*host_output).num_channels == buffer.channels() as i32
|
||||
);
|
||||
}
|
||||
|
||||
// If the host passes weird data then we need to be very sure that there are
|
||||
|
|
Loading…
Reference in a new issue