diff options
author | David Robillard <d@drobilla.net> | 2012-05-13 23:17:14 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-05-13 23:17:14 +0000 |
commit | 883d94c5eaea616f9fd448d6f0987f5d405e570a (patch) | |
tree | b5cf05c32c3a03d458a0b16b69433b680af8bf0a /src | |
parent | 99438f157dd7916335aef306b07a7193a1c70175 (diff) | |
download | mda.lv2-883d94c5eaea616f9fd448d6f0987f5d405e570a.tar.gz mda.lv2-883d94c5eaea616f9fd448d6f0987f5d405e570a.tar.bz2 mda.lv2-883d94c5eaea616f9fd448d6f0987f5d405e570a.zip |
Comment out dead code.
Fix uninitialised member variables.
git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/mda.lv2@4401 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/mdaBeatBox.cpp | 2 | ||||
-rw-r--r-- | src/mdaCombo.cpp | 2 | ||||
-rw-r--r-- | src/mdaMultiBand.cpp | 8 | ||||
-rw-r--r-- | src/mdaRePsycho.cpp | 1 | ||||
-rw-r--r-- | src/mdaRingMod.cpp | 2 | ||||
-rw-r--r-- | src/mdaRoundPan.cpp | 2 | ||||
-rw-r--r-- | src/mdaStereo.cpp | 1 | ||||
-rw-r--r-- | src/mdaTalkBox.cpp | 2 | ||||
-rw-r--r-- | src/mdaVocInput.cpp | 4 |
9 files changed, 15 insertions, 9 deletions
diff --git a/src/mdaBeatBox.cpp b/src/mdaBeatBox.cpp index 96d89cd..fa1c289 100644 --- a/src/mdaBeatBox.cpp +++ b/src/mdaBeatBox.cpp @@ -215,7 +215,7 @@ void mdaBeatBox::synth() memset(sbuf, 0, sbuflen * sizeof(float)); //generate snare de = (float)pow(10.0,-15.0/getSampleRate()); - e=0.38f; dp = 1103.f / getSampleRate(); + e=0.38f; //dp = 1103.f / getSampleRate(); for(t=0;t<7000;t++) { o = (0.3f * o) + (float)((rand() % 2000) - 1000); diff --git a/src/mdaCombo.cpp b/src/mdaCombo.cpp index bd11605..69c8401 100644 --- a/src/mdaCombo.cpp +++ b/src/mdaCombo.cpp @@ -319,8 +319,6 @@ void mdaCombo::process(float **inputs, float **outputs, int32_t sampleFrames) f5 = o2 * f5 + i2 * f4; f10 = o2 * f10 + i2 * f9;//high pass b = f4 - f5; b2 = f9 - f10; - bp = (bp==0)? 999 : bp - 1; //buffer position - *++out1 = c + b; *++out2 = d + b2; bp=bufpos; diff --git a/src/mdaMultiBand.cpp b/src/mdaMultiBand.cpp index 984e3b4..9ae5c96 100644 --- a/src/mdaMultiBand.cpp +++ b/src/mdaMultiBand.cpp @@ -279,7 +279,7 @@ void mdaMultiBand::process(float **inputs, float **outputs, int32_t sampleFrames float *out2 = outputs[1]; float a, b, c, d, l=fb3, m, h, s, sl=slev, tmp1, tmp2, tmp3; float f1i=fi1, f1o=fo1, f2i=fi2, f2o=fo2, b1=fb1, b2=fb2; - float g1=gain1, d1=driv1, t1=trim1, a1=att1, r1=1.f - rel1; + float g1=gain1, /*d1=driv1,*/ t1=trim1, a1=att1, r1=1.f - rel1; float g2=gain2, d2=driv2, t2=trim2, a2=att2, r2=1.f - rel2; float g3=gain3, d3=driv3, t3=trim3, a3=att3, r3=1.f - rel3; int ms=mswap; @@ -306,7 +306,7 @@ void mdaMultiBand::process(float **inputs, float **outputs, int32_t sampleFrames tmp1 = (l>0)? l : -l; //l g1 = (tmp1>g1)? g1+a1*(tmp1-g1) : g1*r1; - tmp1 = 1.f / (1.f + d1 * g1); + //tmp1 = 1.f / (1.f + d1 * g1); tmp2 = (m>0)? m : -m; g2 = (tmp2>g2)? g2+a2*(tmp2-g2) : g2*r2; @@ -338,7 +338,7 @@ void mdaMultiBand::processReplacing(float **inputs, float **outputs, int32_t sam float *out2 = outputs[1]; float a, b, c, d, l=fb3, m, h, s, sl=slev, tmp1, tmp2, tmp3; float f1i=fi1, f1o=fo1, f2i=fi2, f2o=fo2, b1=fb1, b2=fb2; - float g1=gain1, d1=driv1, t1=trim1, a1=att1, r1=1.f - rel1; + float g1=gain1, /*d1=driv1,*/ t1=trim1, a1=att1, r1=1.f - rel1; float g2=gain2, d2=driv2, t2=trim2, a2=att2, r2=1.f - rel2; float g3=gain3, d3=driv3, t3=trim3, a3=att3, r3=1.f - rel3; int ms=mswap; @@ -363,7 +363,7 @@ void mdaMultiBand::processReplacing(float **inputs, float **outputs, int32_t sam tmp1 = (l>0)? l : -l; //l g1 = (tmp1>g1)? g1+a1*(tmp1-g1) : g1*r1; - tmp1 = 1.f / (1.f + d1 * g1); + //tmp1 = 1.f / (1.f + d1 * g1); tmp2 = (m>0)? m : -m; g2 = (tmp2>g2)? g2+a2*(tmp2-g2) : g2*r2; diff --git a/src/mdaRePsycho.cpp b/src/mdaRePsycho.cpp index 4469b49..8c97cc8 100644 --- a/src/mdaRePsycho.cpp +++ b/src/mdaRePsycho.cpp @@ -27,6 +27,7 @@ AudioEffect *createEffectInstance(audioMasterCallback audioMaster) } mdaRePsycho::mdaRePsycho(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, 1, 7) // programs, parameters + , gai(0.0f) { //inits here! fParam1 = (float)0.6; //thresh diff --git a/src/mdaRingMod.cpp b/src/mdaRingMod.cpp index f2cd0b1..d1dd260 100644 --- a/src/mdaRingMod.cpp +++ b/src/mdaRingMod.cpp @@ -26,6 +26,8 @@ AudioEffect *createEffectInstance(audioMasterCallback audioMaster) } mdaRingMod::mdaRingMod(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, 1, 3) // 1 program, 3 parameter only + , fParam4(0.0f) + , nul(0.0f) { fParam1 = (float)0.0625; //1kHz fParam2 = (float)0.0; diff --git a/src/mdaRoundPan.cpp b/src/mdaRoundPan.cpp index e5eb56b..add46d9 100644 --- a/src/mdaRoundPan.cpp +++ b/src/mdaRoundPan.cpp @@ -27,6 +27,8 @@ AudioEffect *createEffectInstance(audioMasterCallback audioMaster) } mdaRoundPan::mdaRoundPan(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, 1, 2) // programs, parameters + , fParam3(0.0f) + , fParam4(0.0f) { //inits here! fParam1 = (float)0.5; //pan diff --git a/src/mdaStereo.cpp b/src/mdaStereo.cpp index 002982d..aaa6038 100644 --- a/src/mdaStereo.cpp +++ b/src/mdaStereo.cpp @@ -27,6 +27,7 @@ AudioEffect *createEffectInstance(audioMasterCallback audioMaster) } mdaStereo::mdaStereo(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, 1, 5) // programs, parameters + , fParam6(0.0f) { //inits here! fParam1 = (float)0.78; //Haas/Comb width diff --git a/src/mdaTalkBox.cpp b/src/mdaTalkBox.cpp index 57f6aa0..4464c58 100644 --- a/src/mdaTalkBox.cpp +++ b/src/mdaTalkBox.cpp @@ -18,6 +18,7 @@ #include "mdaTalkBox.h" +#include <assert.h> #include <stdlib.h> #include <stdio.h> #include <float.h> @@ -345,6 +346,7 @@ void mdaTalkBox::processReplacing(float **inputs, float **outputs, int32_t sampl void mdaTalkBox::lpc(float *buf, float *car, int32_t n, int32_t o) { + assert(o >= 0); float z[ORD_MAX], r[ORD_MAX], k[ORD_MAX], G, x; int32_t i, j, nn=n; diff --git a/src/mdaVocInput.cpp b/src/mdaVocInput.cpp index 854a41e..1ffbe0c 100644 --- a/src/mdaVocInput.cpp +++ b/src/mdaVocInput.cpp @@ -224,7 +224,7 @@ void mdaVocInput::process(float **inputs, float **outputs, int32_t sampleFrames) while(--sampleFrames >= 0) { a = *++in1; - b = *++in2; + //b = *++in2; c = out1[1]; d = out2[1]; @@ -299,7 +299,7 @@ void mdaVocInput::processReplacing(float **inputs, float **outputs, int32_t samp while(--sampleFrames >= 0) { a = *++in1; - b = *++in2; + //b = *++in2; l0 -= lf * (l1 + a); //fundamental filter (peaking 2nd-order 100Hz lpf) l1 -= lf * (l1 - l0); |