RustAudio / dsp-chain

A library for chaining together multiple audio dsp processors/generators, written in Rust!
MIT License
297 stars 20 forks source link

Indexed Inputs and connection per Input Index #144

Closed sebastianpfluegelmeier closed 6 years ago

sebastianpfluegelmeier commented 6 years ago

Add new method audio_requested_by_id(&mut self, buffer: &mut [F], other_inputs: HashMap<usize, Box<F>>, sample_hz: f64) for the Node trait with default implementation. This Method can be implemented so that a Node can accept input from more than one input. The Method add_connection_by_id(&mut self, src: NodeIndex, src_id: usize, dest: NodeIndex) -> Result<EdgeIndex, WouldCycle> can be used to connect two Nodes and specify the input id form the destination node.

sebastianpfluegelmeier commented 6 years ago

Alright, my fault, i thought Nodes can't describe individual inputs. I guess i have to read the API Docs more carefully again. Then i will try to implement it the way you suggest.