zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 7e13d119cee2ea591aa3e8a4b6262461b188c195
parent d2750ab5aecdfadc47b94a44522bacef1fd1585c
Author: Olivier Jolly <[email protected]>
Date:   Thu,  3 Dec 2015 23:07:18 +0100

Add explicit zero initialization of param timestamps

Diffstat:
Msrc/Params/ADnoteParameters.cpp | 5+++--
Msrc/Params/ADnoteParameters.h | 1+
Msrc/Params/Controller.cpp | 2+-
Msrc/Params/EnvelopeParams.cpp | 3++-
Msrc/Params/FilterParams.cpp | 3++-
Msrc/Params/FilterParams.h | 2++
Msrc/Params/LFOParams.cpp | 4++--
Msrc/Params/PADnoteParameters.cpp | 2+-
Msrc/Params/SUBnoteParameters.cpp | 2+-
9 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/src/Params/ADnoteParameters.cpp b/src/Params/ADnoteParameters.cpp @@ -322,7 +322,7 @@ const Ports &ADnoteGlobalParam::ports = globalPorts; ADnoteParameters::ADnoteParameters(const SYNTH_T &synth, FFTwrapper *fft_, const AbsTime *time_) - :PresetsArray(), GlobalPar(time_), time(time_) + :PresetsArray(), GlobalPar(time_), time(time_), last_update_timestamp(0) { setpresettype("Padsynth"); fft = fft_; @@ -337,7 +337,8 @@ ADnoteParameters::ADnoteParameters(const SYNTH_T &synth, FFTwrapper *fft_, defaults(); } -ADnoteGlobalParam::ADnoteGlobalParam(const AbsTime *time_): time(time_) +ADnoteGlobalParam::ADnoteGlobalParam(const AbsTime *time_) : + time(time_), last_update_timestamp(0) { FreqEnvelope = new EnvelopeParams(0, 0, time_); FreqEnvelope->ASRinit(64, 50, 64, 60); diff --git a/src/Params/ADnoteParameters.h b/src/Params/ADnoteParameters.h @@ -118,6 +118,7 @@ struct ADnoteGlobalParam { /* VOICE PARAMETERS */ /***********************************************************/ struct ADnoteVoiceParam { + ADnoteVoiceParam() : time(nullptr), last_update_timestamp(0) { }; void getfromXML(XMLwrapper& xml, unsigned nvoice); void add2XML(XMLwrapper& xml, bool fmoscilused); void paste(ADnoteVoiceParam &p); diff --git a/src/Params/Controller.cpp b/src/Params/Controller.cpp @@ -67,7 +67,7 @@ const rtosc::Ports Controller::ports = { #undef rChangeCb Controller::Controller(const SYNTH_T &synth_, const AbsTime *time_) - :time(time_), synth(synth_) + :time(time_), last_update_timestamp(0), synth(synth_) { defaults(); resetall(); diff --git a/src/Params/EnvelopeParams.cpp b/src/Params/EnvelopeParams.cpp @@ -102,7 +102,8 @@ const rtosc::Ports &EnvelopeParams::ports = localPorts; EnvelopeParams::EnvelopeParams(unsigned char Penvstretch_, unsigned char Pforcedrelease_, - const AbsTime *time_): time(time_) + const AbsTime *time_): + time(time_), last_update_timestamp(0) { PA_dt = 10; PD_dt = 10; diff --git a/src/Params/FilterParams.cpp b/src/Params/FilterParams.cpp @@ -141,7 +141,8 @@ FilterParams::FilterParams(const AbsTime *time_) FilterParams::FilterParams(unsigned char Ptype_, unsigned char Pfreq_, unsigned char Pq_, - const AbsTime *time_): time(time_) + const AbsTime *time_): + time(time_), last_update_timestamp(0) { setpresettype("Pfilter"); Dtype = Ptype_; diff --git a/src/Params/FilterParams.h b/src/Params/FilterParams.h @@ -68,7 +68,9 @@ class FilterParams:public PresetsArray unsigned char Pcenterfreq, Poctavesfreq; //the center frequency of the res. func., and the number of octaves struct Pvowels_t { + Pvowels_t() : last_update_timestamp(0) {} struct formants_t { + formants_t() : last_update_timestamp(0) {} unsigned char freq, amp, q; //frequency,amplitude,Q const AbsTime *time; diff --git a/src/Params/LFOParams.cpp b/src/Params/LFOParams.cpp @@ -78,8 +78,8 @@ LFOParams::LFOParams(char Pfreq_, char Pdelay_, char Pcontinous_, char fel_, - const AbsTime *time_) : time(time_) -{ + const AbsTime *time_) : time(time_), + last_update_timestamp(0) { switch(fel_) { case 0: setpresettype("Plfofrequency"); diff --git a/src/Params/PADnoteParameters.cpp b/src/Params/PADnoteParameters.cpp @@ -254,7 +254,7 @@ const rtosc::MergePorts PADnoteParameters::ports = PADnoteParameters::PADnoteParameters(const SYNTH_T &synth_, FFTwrapper *fft_, const AbsTime *time_) - : Presets(), time(time_), synth(synth_) + : Presets(), time(time_), last_update_timestamp(0), synth(synth_) { setpresettype("Ppadsynth"); diff --git a/src/Params/SUBnoteParameters.cpp b/src/Params/SUBnoteParameters.cpp @@ -135,7 +135,7 @@ static const rtosc::Ports SUBnotePorts = { const rtosc::Ports &SUBnoteParameters::ports = SUBnotePorts; SUBnoteParameters::SUBnoteParameters(const AbsTime *time_) - : Presets(), time(time_) + : Presets(), time(time_), last_update_timestamp(0) { setpresettype("Psubsynth"); AmpEnvelope = new EnvelopeParams(64, 1, time_);