diff options
author | Graham Northup <grissess@nexusg.org> | 2017-10-03 14:50:18 -0400 |
---|---|---|
committer | Graham Northup <grissess@nexusg.org> | 2017-10-03 14:50:18 -0400 |
commit | 22dd5bc5862e91330c8da0d5f141998cdbe546fb (patch) | |
tree | 253cb9f6b080caaad18b2df9f63004266bf73c27 /src/synth | |
parent | 145e2771c0d1ad30748da6e6ef1fabbd4cc2478c (diff) |
Finished clientside parsing, starting graphics
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/mod.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/synth/mod.rs b/src/synth/mod.rs index 60a7372..d48577c 100644 --- a/src/synth/mod.rs +++ b/src/synth/mod.rs @@ -163,6 +163,15 @@ impl IndexMut<usize> for SampleBuffer { fn index_mut(&mut self, idx: usize) -> &mut Sample { &mut self.samples[idx] } } +impl Clone for SampleBuffer { + fn clone(&self) -> SampleBuffer { + SampleBuffer { + samples: self.samples.clone(), + rate: self.rate, + } + } +} + pub trait Generator : Debug { fn eval<'a>(&'a mut self, params: &Parameters) -> &'a SampleBuffer; fn buffer(&self) -> &SampleBuffer; |