From 5aa66987df84a055fe517bf90b2825e780968b9b Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Mon, 28 Apr 2014 21:14:00 +1000 Subject: Defaults a little better Signed-off-by: Damien Zammit --- plugins/ZamSynth/ZamSynthPlugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/ZamSynth/ZamSynthPlugin.cpp b/plugins/ZamSynth/ZamSynthPlugin.cpp index 2fdbfb6..91750a4 100644 --- a/plugins/ZamSynth/ZamSynthPlugin.cpp +++ b/plugins/ZamSynth/ZamSynthPlugin.cpp @@ -112,9 +112,9 @@ void ZamSynthPlugin::d_setProgram(uint32_t index) graph = 0.0f; /* Default variable values */ - for (int i = 0; i < 127; i++) { + for (int i = 0; i < MAX_VOICES; i++) { voice[i].playing = false; - voice[i].notenum = 0; + voice[i].notenum = -1; voice[i].envpos = 0; voice[i].slowcount = 0; voice[i].curamp = 0.f; @@ -125,7 +125,7 @@ void ZamSynthPlugin::d_setProgram(uint32_t index) curvoice = voice; //ptr to first voice for (int i = 0; i < AREAHEIGHT; i++) { - wave_y[i] = sin(i*2.*M_PI/d_getSampleRate()*1000.); + wave_y[i] = sin(i*2.*M_PI/d_getSampleRate());//*1000 } for (int i = 0; i < MAX_ENV; i++) { -- cgit v1.2.3