pub struct GraphBuilder<T: Transcendental, const BUF_SIZE: usize> { /* private fields */ }Expand description
Mutable builder for an immutable audio graph.
Implementations§
Source§impl<T: Transcendental, const BUF_SIZE: usize> GraphBuilder<T, BUF_SIZE>
impl<T: Transcendental, const BUF_SIZE: usize> GraphBuilder<T, BUF_SIZE>
pub fn new() -> Self
pub fn add_source(&mut self, source: Box<dyn Source<T, BUF_SIZE>>) -> usize
pub fn add_processor( &mut self, processor: Box<dyn Processor<T, BUF_SIZE>>, ) -> usize
pub fn add_sink(&mut self, sink: Box<dyn Sink<T, BUF_SIZE>>) -> usize
Sourcepub fn connect_audio(
&mut self,
from_node: usize,
from_port: usize,
to_node: usize,
to_port: usize,
)
pub fn connect_audio( &mut self, from_node: usize, from_port: usize, to_node: usize, to_port: usize, )
Connect audio output port from_port of node from_node
to audio input port to_port of node to_node.
Sourcepub fn connect_feedback(
&mut self,
from_node: usize,
from_port: usize,
to_node: usize,
to_port: usize,
)
pub fn connect_feedback( &mut self, from_node: usize, from_port: usize, to_node: usize, to_port: usize, )
Connect a feedback output to a feedback input. This creates a feedback path (previous output → current input).
Sourcepub fn build(
self,
clock_source: Box<dyn ClockSource>,
) -> Result<AudioGraph<T, BUF_SIZE>, BuildError>
pub fn build( self, clock_source: Box<dyn ClockSource>, ) -> Result<AudioGraph<T, BUF_SIZE>, BuildError>
Build the immutable AudioGraph.
Trait Implementations§
Source§impl<T: Transcendental, const BUF_SIZE: usize> Default for GraphBuilder<T, BUF_SIZE>
impl<T: Transcendental, const BUF_SIZE: usize> Default for GraphBuilder<T, BUF_SIZE>
Auto Trait Implementations§
impl<T, const BUF_SIZE: usize> Freeze for GraphBuilder<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> !RefUnwindSafe for GraphBuilder<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> Send for GraphBuilder<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> Sync for GraphBuilder<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> Unpin for GraphBuilder<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> UnsafeUnpin for GraphBuilder<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> !UnwindSafe for GraphBuilder<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