diff options
author | Graham Northup <grissess@nexusg.org> | 2017-09-19 23:56:15 -0400 |
---|---|---|
committer | Graham Northup <grissess@nexusg.org> | 2017-09-19 23:56:15 -0400 |
commit | 9866c0f34c268a09ecaaa9a4361c1c267799358e (patch) | |
tree | d10bea3717c25105ced7457535412072d343686f /src/synth/param.rs | |
parent | 26e95364ad9073dd7cb571454cd52ae66f320a73 (diff) |
Starting work on proto decode
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) + } } |