pub struct AudioConfig {
pub sample_rate: f64,
pub max_block_size: usize,
pub process_mode: ProcessMode,
pub main_input_channels: u32,
pub main_output_channels: u32,
pub sidechain_input_channels: u32,
pub aux_output_channels: u32,
}Expand description
Config handed to reset when the host (re)prepares the plugin.
Fields§
§sample_rate: f64§max_block_size: usize§process_mode: ProcessMode§main_input_channels: u32Main input channel count for the selected bus layout (0 = no input).
main_output_channels: u32Main output channel count for the selected bus layout.
sidechain_input_channels: u32Optional sidechain input channel count for the selected bus layout (0 = none).
aux_output_channels: u32Optional aux output channel count for the selected bus layout (0 = none).
Implementations§
Source§impl AudioConfig
impl AudioConfig
Sourcepub fn new(sample_rate: f64, max_block_size: usize) -> AudioConfig
pub fn new(sample_rate: f64, max_block_size: usize) -> AudioConfig
Stereo main I/O defaults (matches BusLayout::stereo).
pub fn with_process_mode(self, mode: ProcessMode) -> AudioConfig
pub fn with_channels(self, main_in: u32, main_out: u32) -> AudioConfig
pub fn with_sidechain_channels(self, sidechain_in: u32) -> AudioConfig
pub fn with_aux_channels(self, aux_out: u32) -> AudioConfig
Trait Implementations§
Source§impl Clone for AudioConfig
impl Clone for AudioConfig
Source§fn clone(&self) -> AudioConfig
fn clone(&self) -> AudioConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AudioConfig
Auto Trait Implementations§
impl Forget for AudioConfig
impl Freeze for AudioConfig
impl RefUnwindSafe for AudioConfig
impl Send for AudioConfig
impl Sync for AudioConfig
impl Unpin for AudioConfig
impl UnsafeUnpin for AudioConfig
impl UnwindSafe for AudioConfig
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