#[non_exhaustive]pub struct RoutedChainConfig {
pub sample_rate: f64,
pub max_block_size: usize,
pub sample_format: SampleFormat,
pub mode: ProcessMode,
pub inputs: Vec<Layout>,
pub event_inputs: usize,
pub slots: Vec<SlotAudioConfig>,
}Expand description
Explicit serial-chain configuration, validated before native preparation.
Each direction permits at most 64 audio buses and 512 active channels. External inputs are flattened in caller order; a slot’s native bus IDs do not imply buffer positions.
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.sample_rate: f64Samples per second; must be finite and greater than zero.
max_block_size: usizeMaximum frames per processing call, from 1 through i32::MAX.
sample_format: SampleFormatSample precision shared by all buses and slots.
mode: ProcessModeProcessing mode reported to the plugin.
inputs: Vec<Layout>External bus layouts in caller buffer order.
event_inputs: usizeThe chain’s external event inputs, which events name by index.
slots: Vec<SlotAudioConfig>Per-plugin requests, in the same order as the chain’s instances.
Implementations§
Source§impl RoutedChainConfig
impl RoutedChainConfig
Sourcepub fn new(
sample_rate: f64,
max_block_size: usize,
sample_format: SampleFormat,
inputs: Vec<Layout>,
slots: Vec<SlotAudioConfig>,
) -> RoutedChainConfig
pub fn new( sample_rate: f64, max_block_size: usize, sample_format: SampleFormat, inputs: Vec<Layout>, slots: Vec<SlotAudioConfig>, ) -> RoutedChainConfig
A chain processing inputs through slots offline, without external event inputs; see
Self::with_mode and Self::with_event_inputs.
Sourcepub fn with_mode(self, mode: ProcessMode) -> RoutedChainConfig
pub fn with_mode(self, mode: ProcessMode) -> RoutedChainConfig
Reports mode to the plugins.
Sourcepub fn with_event_inputs(self, event_inputs: usize) -> RoutedChainConfig
pub fn with_event_inputs(self, event_inputs: usize) -> RoutedChainConfig
Gives the chain event_inputs external event inputs.
Sourcepub fn validate(&self, slots: usize) -> Result<(), InputError>
pub fn validate(&self, slots: usize) -> Result<(), InputError>
Validates routing without querying or mutating any plugin. Native bus IDs/layouts are checked when each slot negotiates its requested configuration.
Sourcepub fn input_channels(&self) -> usize
pub fn input_channels(&self) -> usize
Total external input channels in caller buffer order.
Sourcepub fn output_channels(&self) -> usize
pub fn output_channels(&self) -> usize
Total active output channels of the final slot.
Sourcepub fn event_outputs(&self) -> usize
pub fn event_outputs(&self) -> usize
The chain’s event outputs: the last slot’s collected output ports.