#[non_exhaustive]pub struct ProcessConfig {
pub sample_rate: f64,
pub max_block_size: usize,
pub sample_format: SampleFormat,
pub input: Layout,
pub output: Layout,
pub mode: ProcessMode,
}Expand description
Processing configuration for a plugin’s main input and output buses.
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: 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 used by every channel.
input: LayoutRequested main input bus layout; None for an instrument without input.
output: LayoutRequested main output bus layout.
mode: ProcessModeProcessing mode reported to the plugin.
Implementations§
Source§impl ProcessConfig
impl ProcessConfig
Sourcepub const fn new(
sample_rate: f64,
max_block_size: usize,
sample_format: SampleFormat,
input: Layout,
output: Layout,
) -> ProcessConfig
pub const fn new( sample_rate: f64, max_block_size: usize, sample_format: SampleFormat, input: Layout, output: Layout, ) -> ProcessConfig
Offline processing of input to output; see Self::with_mode.
Sourcepub const fn with_mode(self, mode: ProcessMode) -> ProcessConfig
pub const fn with_mode(self, mode: ProcessMode) -> ProcessConfig
Reports mode to the plugin.
Sourcepub fn validate(&self) -> Result<(), InputError>
pub fn validate(&self) -> Result<(), InputError>
Validates scalar values before a format changes the current processing setup. Layout and sample-format support are negotiated with the plugin afterwards.
Trait Implementations§
Source§impl Clone for ProcessConfig
impl Clone for ProcessConfig
impl Copy for ProcessConfig
Source§impl Debug for ProcessConfig
impl Debug for ProcessConfig
Source§impl PartialEq for ProcessConfig
impl PartialEq for ProcessConfig
impl StructuralPartialEq for ProcessConfig
Auto Trait Implementations§
impl Forget for ProcessConfig
impl Freeze for ProcessConfig
impl Move for ProcessConfig
impl RefUnwindSafe for ProcessConfig
impl Send for ProcessConfig
impl Sync for ProcessConfig
impl Unpin for ProcessConfig
impl UnsafeUnpin for ProcessConfig
impl UnwindSafe for ProcessConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more