pub struct AuxiliaryBuffers<'a, S: Sample = f32> { /* private fields */ }Expand description
Auxiliary audio buffers for sidechain and multi-bus processing.
Contains all non-main audio buses. Most plugins don’t need this -
they only use the main Buffer.
§Type Parameter
S is the sample type, defaulting to f32. Use AuxiliaryBuffers<f64> for
64-bit double precision processing.
§Bus Indexing
Auxiliary buses are indexed starting from 0:
- Bus 0: Sidechain (most common aux use case)
- Bus 1+: Additional auxiliary I/O
§Real-Time Safety
This struct uses fixed-size stack storage. No heap allocations occur during construction or use.
§Example: Sidechain Access
if let Some(sidechain) = aux.sidechain() {
let key_signal = sidechain.input(0);
// Use for compression keying, ducking, etc.
}Implementations§
Source§impl<'a, S: Sample> AuxiliaryBuffers<'a, S>
impl<'a, S: Sample> AuxiliaryBuffers<'a, S>
Sourcepub fn new(
inputs: impl IntoIterator<Item = impl IntoIterator<Item = &'a [S]>>,
outputs: impl IntoIterator<Item = impl IntoIterator<Item = &'a mut [S]>>,
num_samples: usize,
) -> Self
pub fn new( inputs: impl IntoIterator<Item = impl IntoIterator<Item = &'a [S]>>, outputs: impl IntoIterator<Item = impl IntoIterator<Item = &'a mut [S]>>, num_samples: usize, ) -> Self
Create new auxiliary buffers.
This is called by the VST3 wrapper, not by plugin code. Buses/channels beyond the limits are silently ignored.
Sourcepub fn num_samples(&self) -> usize
pub fn num_samples(&self) -> usize
Number of samples in this processing block.
Sourcepub fn num_input_buses(&self) -> usize
pub fn num_input_buses(&self) -> usize
Number of auxiliary input buses.
Sourcepub fn num_output_buses(&self) -> usize
pub fn num_output_buses(&self) -> usize
Number of auxiliary output buses.
Sourcepub fn input(&self, bus: usize) -> Option<AuxInput<'_, S>>
pub fn input(&self, bus: usize) -> Option<AuxInput<'_, S>>
Get an auxiliary input bus by index.
Returns None if the bus doesn’t exist or has no channels.
Sourcepub fn output(&mut self, bus: usize) -> Option<AuxOutput<'_, 'a, S>>
pub fn output(&mut self, bus: usize) -> Option<AuxOutput<'_, 'a, S>>
Get a mutable auxiliary output bus by index.
Returns None if the bus doesn’t exist or has no channels.
Sourcepub fn iter_inputs(&self) -> impl Iterator<Item = AuxInput<'_, S>> + '_
pub fn iter_inputs(&self) -> impl Iterator<Item = AuxInput<'_, S>> + '_
Iterate over all auxiliary input buses.
Sourcepub fn iter_outputs(
&mut self,
) -> impl Iterator<Item = AuxOutput<'_, 'a, S>> + '_
pub fn iter_outputs( &mut self, ) -> impl Iterator<Item = AuxOutput<'_, 'a, S>> + '_
Iterate over all auxiliary output buses mutably.