From e39cbfb9dcf0c00133945eab186072274b45358a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 13 May 2009 16:04:14 +0000 Subject: Strip trailing whitespace. git-svn-id: http://svn.drobilla.net/lad/trunk/mda-lv2@1999 a436a847-0d15-0410-975c-d299462d15a1 --- src/mdaOverdrive.cpp | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'src/mdaOverdrive.cpp') diff --git a/src/mdaOverdrive.cpp b/src/mdaOverdrive.cpp index 280e88c..2abe56d 100644 --- a/src/mdaOverdrive.cpp +++ b/src/mdaOverdrive.cpp @@ -1,5 +1,5 @@ #include "mdaOverdrive.h" - + #include @@ -10,16 +10,16 @@ AudioEffect *createEffectInstance(audioMasterCallback audioMaster) mdaOverdrive::mdaOverdrive(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, 1, 3) // 1 program, 3 parameters { - fParam1 = 0.0f; + fParam1 = 0.0f; fParam2 = 0.0f; fParam3 = 0.5f; - setNumInputs(2); - setNumOutputs(2); + setNumInputs(2); + setNumOutputs(2); setUniqueID("mdaOverdrive"); // identify - DECLARE_LVZ_DEPRECATED(canMono) (); - canProcessReplacing(); - strcpy(programName, "Soft Overdrive"); + DECLARE_LVZ_DEPRECATED(canMono) (); + canProcessReplacing(); + strcpy(programName, "Soft Overdrive"); filt1 = filt2 = 0.0f; setParameter(0, 0.0f); @@ -90,7 +90,7 @@ void mdaOverdrive::getParameterDisplay(LvzInt32 index, char *text) case 1: long2string((long)(100 * fParam2 ), text); break; case 2: long2string((long)( 40 * fParam3 - 20), text); break; } - + } void mdaOverdrive::getParameterLabel(LvzInt32 index, char *label) @@ -99,7 +99,7 @@ void mdaOverdrive::getParameterLabel(LvzInt32 index, char *label) { case 0: strcpy(label, "%"); break; case 1: strcpy(label, "%"); break; - case 2: strcpy(label, "dB"); break; + case 2: strcpy(label, "dB"); break; } } @@ -116,7 +116,7 @@ void mdaOverdrive::process(float **inputs, float **outputs, LvzInt32 sampleFrame float i=fParam1, g=gain, aa, bb; float f=filt, fa=filt1, fb=filt2; - --in1; + --in1; --in2; --out1; --out2; @@ -124,19 +124,19 @@ void mdaOverdrive::process(float **inputs, float **outputs, LvzInt32 sampleFrame { a = *++in1; b = *++in2; - + c = out1[1]; d = out2[1]; aa = (a>0.0f)? (float)sqrt(a) : (float)-sqrt(-a); //overdrive - bb = (b>0.0f)? (float)sqrt(b) : (float)-sqrt(-b); + bb = (b>0.0f)? (float)sqrt(b) : (float)-sqrt(-b); - fa = fa + f * (i*(aa-a) + a - fa); //filter - fb = fb + f * (i*(bb-b) + b - fb); + fa = fa + f * (i*(aa-a) + a - fa); //filter + fb = fb + f * (i*(bb-b) + b - fb); - c += fa * g; + c += fa * g; d += fb * g; - + *++out1 = c; *++out2 = d; } @@ -153,26 +153,26 @@ void mdaOverdrive::processReplacing(float **inputs, float **outputs, LvzInt32 sa float a, b, c, d; float i=fParam1, g=gain, aa, bb; float f=filt, fa=filt1, fb=filt2; - - --in1; + + --in1; --in2; --out1; --out2; while(--sampleFrames >= 0) { - a = *++in1; + a = *++in1; b = *++in2; - + aa = (a>0.0f)? (float)sqrt(a) : (float)-sqrt(-a); //overdrive - bb = (b>0.0f)? (float)sqrt(b) : (float)-sqrt(-b); + bb = (b>0.0f)? (float)sqrt(b) : (float)-sqrt(-b); - fa = fa + f * (i*(aa-a) + a - fa); //filter - fb = fb + f * (i*(bb-b) + b - fb); + fa = fa + f * (i*(aa-a) + a - fa); //filter + fb = fb + f * (i*(bb-b) + b - fb); - c = fa * g; + c = fa * g; d = fb * g; - *++out1 = c; + *++out1 = c; *++out2 = d; } if(fabs(fa)>1.0e-10) filt1 = fa; else filt1 = 0.0f; //catch denormals -- cgit v1.2.1