Skip to main content

RoutedChainConfig

Struct RoutedChainConfig 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§sample_rate: f64

Samples per second; must be finite and greater than zero.

§max_block_size: usize

Maximum frames per processing call, from 1 through i32::MAX.

§sample_format: SampleFormat

Sample precision shared by all buses and slots.

§mode: ProcessMode

Processing mode reported to the plugin.

§inputs: Vec<Layout>

External bus layouts in caller buffer order.

§event_inputs: usize

The 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

Source

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.

Source

pub fn with_mode(self, mode: ProcessMode) -> RoutedChainConfig

Reports mode to the plugins.

Source

pub fn with_event_inputs(self, event_inputs: usize) -> RoutedChainConfig

Gives the chain event_inputs external event inputs.

Source

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.

Source

pub fn input_channels(&self) -> usize

Total external input channels in caller buffer order.

Source

pub fn output_channels(&self) -> usize

Total active output channels of the final slot.

Source

pub fn event_outputs(&self) -> usize

The chain’s event outputs: the last slot’s collected output ports.

Trait Implementations§

Source§

impl Clone for RoutedChainConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RoutedChainConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for RoutedChainConfig

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RoutedChainConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.