pub struct ChannelRouterBlock<S: Sample> {
pub mode: ChannelMode,
pub mono: bool,
pub invert_left: bool,
pub invert_right: bool,
/* private fields */
}Expand description
A channel router block for stereo signal manipulation.
Supports channel selection, mono summing, and phase inversion.
Fields§
§mode: ChannelModeChannel routing mode.
mono: boolSum to mono (L+R)/2 on both channels.
invert_left: boolInvert left channel phase.
invert_right: boolInvert right channel phase.
Implementations§
Source§impl<S: Sample> ChannelRouterBlock<S>
impl<S: Sample> ChannelRouterBlock<S>
Sourcepub fn new(
mode: ChannelMode,
mono: bool,
invert_left: bool,
invert_right: bool,
) -> Self
pub fn new( mode: ChannelMode, mono: bool, invert_left: bool, invert_right: bool, ) -> Self
Create a new ChannelRouterBlock.
Sourcepub fn default_new() -> Self
pub fn default_new() -> Self
Create with default settings (stereo passthrough).
Trait Implementations§
Source§impl<S: Sample> Block<S> for ChannelRouterBlock<S>
impl<S: Sample> Block<S> for ChannelRouterBlock<S>
Source§fn process(
&mut self,
inputs: &[&[S]],
outputs: &mut [&mut [S]],
_modulation_values: &[S],
_context: &DspContext,
)
fn process( &mut self, inputs: &[&[S]], outputs: &mut [&mut [S]], _modulation_values: &[S], _context: &DspContext, )
Process audio through this block. Read more
Source§fn input_count(&self) -> usize
fn input_count(&self) -> usize
Returns the number of input ports this block accepts.
Source§fn output_count(&self) -> usize
fn output_count(&self) -> usize
Returns the number of output ports this block produces.
Source§fn modulation_outputs(&self) -> &[ModulationOutput]
fn modulation_outputs(&self) -> &[ModulationOutput]
Returns the modulation outputs this block provides. Read more
Source§fn channel_config(&self) -> ChannelConfig
fn channel_config(&self) -> ChannelConfig
Returns how this block handles multi-channel audio. Read more
Source§impl<S: Sample> From<ChannelRouterBlock<S>> for BlockType<S>
impl<S: Sample> From<ChannelRouterBlock<S>> for BlockType<S>
Source§fn from(block: ChannelRouterBlock<S>) -> Self
fn from(block: ChannelRouterBlock<S>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<S> Freeze for ChannelRouterBlock<S>
impl<S> RefUnwindSafe for ChannelRouterBlock<S>where
S: RefUnwindSafe,
impl<S> Send for ChannelRouterBlock<S>
impl<S> Sync for ChannelRouterBlock<S>
impl<S> Unpin for ChannelRouterBlock<S>where
S: Unpin,
impl<S> UnwindSafe for ChannelRouterBlock<S>where
S: UnwindSafe,
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