pub struct GraphBuilder { /* private fields */ }Expand description
Builder for constructing audio graphs on the main thread.
Implementations§
Source§impl GraphBuilder
impl GraphBuilder
pub fn new(max_frames: usize) -> Self
Sourcepub fn add_node(self, node: Box<dyn AudioNode>) -> Self
pub fn add_node(self, node: Box<dyn AudioNode>) -> Self
Add a node to the graph. Returns the builder for chaining.
Sourcepub fn add_edge(self, from: NodeId, to: NodeId) -> Self
pub fn add_edge(self, from: NodeId, to: NodeId) -> Self
Add an edge (signal flow) from one node to another.
Sourcepub fn set_master(self, id: NodeId) -> Self
pub fn set_master(self, id: NodeId) -> Self
Set the master output node explicitly.
Sourcepub fn build(self) -> Result<Arc<GraphSnapshot>, GraphError>
pub fn build(self) -> Result<Arc<GraphSnapshot>, GraphError>
Build the graph and return a snapshot ready for atomic swap.
Auto Trait Implementations§
impl !RefUnwindSafe for GraphBuilder
impl !UnwindSafe for GraphBuilder
impl Freeze for GraphBuilder
impl Send for GraphBuilder
impl Sync for GraphBuilder
impl Unpin for GraphBuilder
impl UnsafeUnpin 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