pub enum NodeVariant<T: Transcendental, const BUF_SIZE: usize> {
Source(Box<dyn Source<T, BUF_SIZE>>),
Processor(Box<dyn Processor<T, BUF_SIZE>>),
Sink(Box<dyn Sink<T, BUF_SIZE>>),
}Expand description
Enum that holds any kind of audio node.
Variants§
Source(Box<dyn Source<T, BUF_SIZE>>)
Processor(Box<dyn Processor<T, BUF_SIZE>>)
Sink(Box<dyn Sink<T, BUF_SIZE>>)
Trait Implementations§
Source§impl<T: Transcendental, const BUF_SIZE: usize> Processable<T, BUF_SIZE> for NodeVariant<T, BUF_SIZE>
impl<T: Transcendental, const BUF_SIZE: usize> Processable<T, BUF_SIZE> for NodeVariant<T, BUF_SIZE>
Source§fn process_block(
&mut self,
ctx: &mut ProcessContext<'_, T, BUF_SIZE>,
) -> ProcessResult<()>
fn process_block( &mut self, ctx: &mut ProcessContext<'_, T, BUF_SIZE>, ) -> ProcessResult<()>
Process a single block of audio. Read more
Source§impl<T: Transcendental, const BUF_SIZE: usize> SignalNode<T, BUF_SIZE> for NodeVariant<T, BUF_SIZE>
impl<T: Transcendental, const BUF_SIZE: usize> SignalNode<T, BUF_SIZE> for NodeVariant<T, BUF_SIZE>
Source§fn metadata(&self) -> NodeMetadata
fn metadata(&self) -> NodeMetadata
Get node metadata
Source§fn get_parameter(&self, id: &ParameterId) -> Option<ParamValue>
fn get_parameter(&self, id: &ParameterId) -> Option<ParamValue>
Get the value of a parameter
Source§fn set_parameter(
&mut self,
id: &ParameterId,
value: ParamValue,
) -> ProcessResult<()>
fn set_parameter( &mut self, id: &ParameterId, value: ParamValue, ) -> ProcessResult<()>
Set the value of a parameter
Source§fn num_signal_inputs(&self) -> usize
fn num_signal_inputs(&self) -> usize
Number of signal input ports
Source§fn num_signal_outputs(&self) -> usize
fn num_signal_outputs(&self) -> usize
Number of signal output ports
Source§fn num_control_inputs(&self) -> usize
fn num_control_inputs(&self) -> usize
Number of control input ports
Source§fn num_control_outputs(&self) -> usize
fn num_control_outputs(&self) -> usize
Number of control output ports
Source§fn num_clock_inputs(&self) -> usize
fn num_clock_inputs(&self) -> usize
Number of clock input ports
Source§fn num_clock_outputs(&self) -> usize
fn num_clock_outputs(&self) -> usize
Number of clock output ports
Source§fn num_feedback_ports(&self) -> usize
fn num_feedback_ports(&self) -> usize
Number of feedback ports
Source§fn input_port_mut(&mut self, index: usize) -> Option<&mut Port<T, BUF_SIZE>>
fn input_port_mut(&mut self, index: usize) -> Option<&mut Port<T, BUF_SIZE>>
Get mutable input port by index
Source§fn output_port_mut(&mut self, index: usize) -> Option<&mut Port<T, BUF_SIZE>>
fn output_port_mut(&mut self, index: usize) -> Option<&mut Port<T, BUF_SIZE>>
Get mutable output port by index
Source§fn control_port_mut(&mut self, index: usize) -> Option<&mut Port<T, BUF_SIZE>>
fn control_port_mut(&mut self, index: usize) -> Option<&mut Port<T, BUF_SIZE>>
Get mutable control port by index
Source§fn node_type_id(&self) -> NodeTypeIdwhere
Self: 'static + Sized,
fn node_type_id(&self) -> NodeTypeIdwhere
Self: 'static + Sized,
Get the node’s type ID
Source§fn apply_set_parameter(&mut self, cmd: &SetParameter) -> ProcessResult<()>
fn apply_set_parameter(&mut self, cmd: &SetParameter) -> ProcessResult<()>
Apply a
SetParameter command to this node. Read moreSource§fn num_inputs(&self) -> usize
fn num_inputs(&self) -> usize
Total number of input ports
Source§fn num_outputs(&self) -> usize
fn num_outputs(&self) -> usize
Total number of output ports
Auto Trait Implementations§
impl<T, const BUF_SIZE: usize> Freeze for NodeVariant<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> !RefUnwindSafe for NodeVariant<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> Send for NodeVariant<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> Sync for NodeVariant<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> Unpin for NodeVariant<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> UnsafeUnpin for NodeVariant<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> !UnwindSafe for NodeVariant<T, BUF_SIZE>
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