drop tone off

This commit is contained in:
Bel LaPointe
2026-03-11 15:37:05 -06:00
parent beb6595f42
commit bd0a6007f7

View File

@@ -70,20 +70,6 @@ impl Syn {
}; };
} }
fn tone_off(&mut self, ch: i32, b: tone::Tone) {
match self {
Syn::Real(syn) => syn.note_off(ch, b.i32()),
Syn::Text { m, .. } => {
match m.get_mut(&ch) {
Some(m) => {
m.remove(&b.i32());
}
None => {}
};
}
};
}
pub fn render(&mut self, a: &mut [f32], b: &mut [f32]) { pub fn render(&mut self, a: &mut [f32], b: &mut [f32]) {
match self { match self {
Syn::Real(syn) => syn.render(a, b), Syn::Real(syn) => syn.render(a, b),
@@ -106,8 +92,6 @@ mod test {
syn.tone_on(0, tone::new("c")); syn.tone_on(0, tone::new("c"));
syn.tone_on(0, tone::new("d")); syn.tone_on(0, tone::new("d"));
syn.tone_off(0, tone::new("d"));
let mut buffer1 = Vec::<f32>::new(); let mut buffer1 = Vec::<f32>::new();
let mut buffer2 = Vec::<f32>::new(); let mut buffer2 = Vec::<f32>::new();
syn.render(&mut buffer1, &mut buffer2); syn.render(&mut buffer1, &mut buffer2);
@@ -120,8 +104,6 @@ mod test {
syn.tone_on(0, tone::new("c")); syn.tone_on(0, tone::new("c"));
syn.tone_on(0, tone::new("d")); syn.tone_on(0, tone::new("d"));
syn.tone_off(0, tone::new("d"));
let mut buffer1 = Vec::<f32>::new(); let mut buffer1 = Vec::<f32>::new();
let mut buffer2 = Vec::<f32>::new(); let mut buffer2 = Vec::<f32>::new();
syn.render(&mut buffer1, &mut buffer2); syn.render(&mut buffer1, &mut buffer2);