From 2a121fda507fbbb527888672ec5a128eb8b3dd2f Mon Sep 17 00:00:00 2001 From: fundamental Date: Thu, 8 Oct 2009 20:59:49 -0400 Subject: [PATCH] ADnote: Documented/added const usage (cherry picked from commit 3b8e3f871fda2f995adf66d436e68addf393af39) --- plugins/zynaddsubfx/src/Synth/ADnote.cpp | 8 +-- plugins/zynaddsubfx/src/Synth/ADnote.h | 62 ++++++++++++++++++++---- 2 files changed, 57 insertions(+), 13 deletions(-) diff --git a/plugins/zynaddsubfx/src/Synth/ADnote.cpp b/plugins/zynaddsubfx/src/Synth/ADnote.cpp index 200c32803..6b3a0d0e7 100644 --- a/plugins/zynaddsubfx/src/Synth/ADnote.cpp +++ b/plugins/zynaddsubfx/src/Synth/ADnote.cpp @@ -830,7 +830,7 @@ void ADnote::setfreqFM(int nvoice,REALTYPE in_freq) /* * Get Voice base frequency */ -REALTYPE ADnote::getvoicebasefreq(int nvoice) +REALTYPE ADnote::getvoicebasefreq(int nvoice) const { REALTYPE detune=NoteVoicePar[nvoice].Detune/100.0+ NoteVoicePar[nvoice].FineDetune/100.0*ctl->bandwidth.relbw*bandwidthDetuneMultiplier+ @@ -852,7 +852,7 @@ REALTYPE ADnote::getvoicebasefreq(int nvoice) /* * Get Voice's Modullator base frequency */ -REALTYPE ADnote::getFMvoicebasefreq(int nvoice) +REALTYPE ADnote::getFMvoicebasefreq(int nvoice) const { REALTYPE detune=NoteVoicePar[nvoice].FMDetune/100.0; return(getvoicebasefreq(nvoice)*pow(2,detune/12.0)); @@ -969,7 +969,7 @@ void ADnote::computecurrentparameters() /* * Fadein in a way that removes clicks but keep sound "punchy" */ -inline void ADnote::fadein(REALTYPE *smps) +inline void ADnote::fadein(REALTYPE *smps) const { int zerocrossings=0; for (int i=1;i