Skip to content

Commit

Permalink
route method no longer required
Browse files Browse the repository at this point in the history
  • Loading branch information
tomara-x committed Jun 21, 2024
1 parent a897581 commit 37bd5c2
Showing 1 changed file with 0 additions and 51 deletions.
51 changes: 0 additions & 51 deletions src/nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ impl AudioNode for Select {
net.reset();
}
}

// TODO
fn route(&mut self, input: &SignalFrame, _frequency: f64) -> SignalFrame {
input.clone()
}
}


Expand Down Expand Up @@ -126,11 +121,6 @@ impl AudioNode for Seq {
net.reset();
}
}

// TODO
fn route(&mut self, input: &SignalFrame, _frequency: f64) -> SignalFrame {
input.clone()
}
}


Expand Down Expand Up @@ -162,11 +152,6 @@ impl AudioNode for ArrGet {
}
buffer.into()
}

// TODO
fn route(&mut self, input: &SignalFrame, _frequency: f64) -> SignalFrame {
input.clone()
}
}

/// shift register
Expand Down Expand Up @@ -208,11 +193,6 @@ impl AudioNode for ShiftReg {
fn reset(&mut self) {
self.reg = [0., 0., 0., 0., 0., 0., 0., 0.];
}

// TODO
fn route(&mut self, input: &SignalFrame, _frequency: f64) -> SignalFrame {
input.clone()
}
}

/// quantizer
Expand Down Expand Up @@ -253,11 +233,6 @@ impl AudioNode for Quantizer {
buffer[0] = n + nearest - wrapped;
buffer.into()
}

// TODO
fn route(&mut self, input: &SignalFrame, _frequency: f64) -> SignalFrame {
input.clone()
}
}


Expand Down Expand Up @@ -306,10 +281,6 @@ impl AudioNode for Kr {
self.val = 0.;
self.net.reset();
}

fn route(&mut self, input: &SignalFrame, _frequency: f64) -> SignalFrame {
signal::Routing::Generator(0.0).route(input, self.outputs())
}
}


Expand Down Expand Up @@ -363,10 +334,6 @@ impl AudioNode for Reset {
self.count = 0;
self.net.reset();
}

fn route(&mut self, input: &SignalFrame, _frequency: f64) -> SignalFrame {
signal::Routing::Generator(0.0).route(input, self.outputs())
}
}

/// reset network when triggered
Expand Down Expand Up @@ -406,11 +373,6 @@ impl AudioNode for TrigReset {
fn reset(&mut self) {
self.net.reset();
}

// TODO
fn route(&mut self, input: &SignalFrame, _frequency: f64) -> SignalFrame {
input.clone()
}
}

/// reset network every s seconds (duration as input)
Expand Down Expand Up @@ -458,11 +420,6 @@ impl AudioNode for ResetV {
self.count = 0;
self.net.reset();
}

// TODO
fn route(&mut self, input: &SignalFrame, _frequency: f64) -> SignalFrame {
input.clone()
}
}

/// phasor (ramp from 0..1)
Expand Down Expand Up @@ -503,10 +460,6 @@ impl AudioNode for Ramp {
fn set_sample_rate(&mut self, sample_rate: f64) {
self.sr = sample_rate as f32;
}

fn route(&mut self, input: &SignalFrame, _frequency: f64) -> SignalFrame {
signal::Routing::Generator(0.0).route(input, self.outputs())
}
}


Expand Down Expand Up @@ -545,9 +498,5 @@ impl AudioNode for InputNode {

//fn set_sample_rate(&mut self, sample_rate: f64) {
//}

fn route(&mut self, input: &SignalFrame, _frequency: f64) -> SignalFrame {
signal::Routing::Generator(0.0).route(input, self.outputs())
}
}

0 comments on commit 37bd5c2

Please sign in to comment.