pub struct ChannelSplitterBlock<S>where
S: Sample,{ /* private fields */ }Expand description
Splits multi-channel input into individual mono outputs.
Each input channel is copied to the corresponding output port, allowing downstream blocks to process channels independently.
§Example
A 4-channel splitter takes 4 input channels and outputs them as 4 separate mono signals that can be routed to different blocks.
Implementations§
Source§impl<S> ChannelSplitterBlock<S>where
S: Sample,
impl<S> ChannelSplitterBlock<S>where
S: Sample,
Sourcepub fn new(channels: usize) -> ChannelSplitterBlock<S>
pub fn new(channels: usize) -> ChannelSplitterBlock<S>
Create a new channel splitter for the given number of channels.
§Panics
Panics if channels is 0 or greater than MAX_BLOCK_OUTPUTS (16).
Sourcepub fn channel_count(&self) -> usize
pub fn channel_count(&self) -> usize
Returns the number of channels this splitter handles.
Trait Implementations§
Source§impl<S> Block<S> for ChannelSplitterBlock<S>where
S: Sample,
impl<S> Block<S> for ChannelSplitterBlock<S>where
S: Sample,
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
Auto Trait Implementations§
impl<S> Freeze for ChannelSplitterBlock<S>
impl<S> RefUnwindSafe for ChannelSplitterBlock<S>where
S: RefUnwindSafe,
impl<S> Send for ChannelSplitterBlock<S>
impl<S> Sync for ChannelSplitterBlock<S>
impl<S> Unpin for ChannelSplitterBlock<S>where
S: Unpin,
impl<S> UnwindSafe for ChannelSplitterBlock<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