pub struct GraphBuilder { /* private fields */ }Expand description
Builder for constructing the audio processing graph.
GraphBuilder allows you to add nodes and define the connections (edges)
between them. It supports both standard forward connections and feedback loops.
Implementations§
Source§impl GraphBuilder
impl GraphBuilder
pub fn new() -> Self
Sourcepub fn add_node(&mut self, node: NodeType) -> NodeId
pub fn add_node(&mut self, node: NodeType) -> NodeId
Adds a node to the graph and returns its unique NodeId.
Sourcepub fn connect(&mut self, source: NodeId, destination: NodeId)
pub fn connect(&mut self, source: NodeId, destination: NodeId)
Connects the output of the source node to the input of the destination node.
Sourcepub fn connect_feedback(&mut self, source: NodeId, destination: NodeId)
pub fn connect_feedback(&mut self, source: NodeId, destination: NodeId)
Establishes a feedback connection (back-edge) between nodes.
Feedback edges are excluded from topological sorting and introduce a 1-block delay. Use this for feedback loops (e.g., in delays or recursive filters).
Sourcepub fn build(
self,
destination_id: NodeId,
msg_receiver: Receiver<ControlMessage>,
) -> StaticGraph
pub fn build( self, destination_id: NodeId, msg_receiver: Receiver<ControlMessage>, ) -> StaticGraph
Topological sorting and generation of high-performance StaticGraph with buffer reuse optimization
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphBuilder
impl !RefUnwindSafe for GraphBuilder
impl Send for GraphBuilder
impl !Sync for GraphBuilder
impl Unpin for GraphBuilder
impl UnsafeUnpin for GraphBuilder
impl !UnwindSafe for GraphBuilder
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