diff options
Diffstat (limited to 'src/synth/param.rs')
-rw-r--r-- | src/synth/param.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/synth/param.rs b/src/synth/param.rs index ced5900..f679b56 100644 --- a/src/synth/param.rs +++ b/src/synth/param.rs @@ -1,5 +1,6 @@ use super::*; +#[derive(Debug)] pub struct Param { pub name: String, pub default: Sample, @@ -11,4 +12,7 @@ impl Generator for Param { self.buf.set(*params.vars.get(&self.name).unwrap_or(&self.default)); &self.buf } + fn set_buffer(&mut self, buf: SampleBuffer) -> SampleBuffer { + mem::replace(&mut self.buf, buf) + } } |