MCPcopy Create free account
hub / github.com/BillyDM/Firewheel / connect

Method connect

examples/visual_node_graph/src/ui.rs:209–224  ·  view source on GitHub ↗
(&mut self, from: &OutPin, to: &InPin, snarl: &mut Snarl<GuiAudioNode>)

Source from the content-addressed store, hash-verified

207 }
208
209 fn connect(&mut self, from: &OutPin, to: &InPin, snarl: &mut Snarl<GuiAudioNode>) {
210 let src_node = snarl.get_node(from.id.node).unwrap().id;
211 let dst_node = snarl.get_node(to.id.node).unwrap().id;
212
213 if let Err(e) = self.audio_system.connect(
214 src_node,
215 dst_node,
216 from.id.output as u32,
217 to.id.input as u32,
218 ) {
219 tracing::error!("{}", e);
220 return;
221 }
222
223 snarl.connect(from.id, to.id);
224 }
225
226 fn title(&mut self, node: &GuiAudioNode) -> String {
227 node.title()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected