From 22dd5bc5862e91330c8da0d5f141998cdbe546fb Mon Sep 17 00:00:00 2001 From: Graham Northup Date: Tue, 3 Oct 2017 14:50:18 -0400 Subject: Finished clientside parsing, starting graphics --- src/synth/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/synth/mod.rs') 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 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; -- cgit v1.2.3-70-g09d2