From f063271c232a4447169376e0c2be0c8a50649985 Mon Sep 17 00:00:00 2001 From: Hugo van der Merwe <17109322+hugovdm@users.noreply.github.com> Date: Thu, 3 Aug 2023 03:42:34 +0200 Subject: [PATCH] Fix synth_tones frequency (#792) Each *_wave() function calls advance_sample(). Having tick() also call it results in skipping every second sample. --- examples/synth_tones.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/synth_tones.rs b/examples/synth_tones.rs index f86e813..c83f816 100644 --- a/examples/synth_tones.rs +++ b/examples/synth_tones.rs @@ -81,7 +81,6 @@ impl Oscillator { } fn tick(&mut self) -> f32 { - self.advance_sample(); match self.waveform { Waveform::Sine => self.sine_wave(), Waveform::Square => self.square_wave(),