#[non_exhaustive]pub struct BusLayout {
pub inputs: Vec<BusConfig>,
pub outputs: Vec<BusConfig>,
}Expand description
Describes the audio bus configuration of a plugin.
By convention, the first input bus is the main audio in
(effects + analyzers) and any subsequent input buses are sidechain
inputs. The first output bus is the main audio out. Format
wrappers (CLAP / VST3 / AU / AAX / LV2) rely on this ordering when
they translate into format-specific main/aux bus designations, and
BusConfig::kind lets call-sites that need it ask the bus
directly rather than re-deriving the convention.
Construct via Self::new / Self::stereo + the with_*
builders rather than struct literal - #[non_exhaustive] so
pre-1.0 future fields don’t break downstream.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.inputs: Vec<BusConfig>§outputs: Vec<BusConfig>Implementations§
Source§impl BusLayout
impl BusLayout
pub fn new() -> Self
pub fn stereo() -> Self
Sourcepub fn with_input(self, name: &'static str, channels: ChannelConfig) -> Self
pub fn with_input(self, name: &'static str, channels: ChannelConfig) -> Self
Append a main audio input bus. First call → main audio in;
subsequent calls → sidechain inputs (use Self::with_sidechain_input
if you prefer to be explicit).
Sourcepub fn with_sidechain_input(
self,
name: &'static str,
channels: ChannelConfig,
) -> Self
pub fn with_sidechain_input( self, name: &'static str, channels: ChannelConfig, ) -> Self
Append a sidechain input bus. Equivalent to Self::with_input
after the first input has already been added, but lets call
sites express intent.
pub fn with_output(self, name: &'static str, channels: ChannelConfig) -> Self
Sourcepub fn sidechain_input_indices(&self) -> impl Iterator<Item = usize> + '_
pub fn sidechain_input_indices(&self) -> impl Iterator<Item = usize> + '_
Return the indices of all sidechain input buses.