pub struct MainOutputChannels(pub u32);Expand description
Number of channels on the main output bus.
Use for plugins that need per-channel output state allocation, like surround processors or multi-channel analyzers.
§Example
ⓘ
impl Descriptor for SurroundPlugin {
type Setup = (SampleRate, MainOutputChannels);
fn prepare(self, (sr, channels): (SampleRate, MainOutputChannels)) -> SurroundProcessor {
SurroundProcessor {
sample_rate: sr.0,
per_channel_state: vec![State::new(); channels.0 as usize],
}
}
}Tuple Fields§
§0: u32Trait Implementations§
Source§impl Clone for MainOutputChannels
impl Clone for MainOutputChannels
Source§fn clone(&self) -> MainOutputChannels
fn clone(&self) -> MainOutputChannels
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MainOutputChannels
impl Debug for MainOutputChannels
Source§impl PartialEq for MainOutputChannels
impl PartialEq for MainOutputChannels
Source§impl PluginSetup for MainOutputChannels
impl PluginSetup for MainOutputChannels
Source§fn extract(host: &HostSetup) -> MainOutputChannels
fn extract(host: &HostSetup) -> MainOutputChannels
Extract this setup from the host-provided information.
impl Copy for MainOutputChannels
impl StructuralPartialEq for MainOutputChannels
Auto Trait Implementations§
impl Freeze for MainOutputChannels
impl RefUnwindSafe for MainOutputChannels
impl Send for MainOutputChannels
impl Sync for MainOutputChannels
impl Unpin for MainOutputChannels
impl UnwindSafe for MainOutputChannels
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