diff options
author | David Robillard <d@drobilla.net> | 2010-02-22 21:24:34 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-22 21:24:34 +0000 |
commit | adacb33bf4eadcd49a744177bf3f059e7b2f2f52 (patch) | |
tree | 922620c99fdc348529002d1a000ec0e8f94f3041 /src/mdaAmbience.cpp | |
parent | 4514036c46168f4bbc693649989d53bdffe6137b (diff) | |
download | mda.lv2-adacb33bf4eadcd49a744177bf3f059e7b2f2f52.tar.gz mda.lv2-adacb33bf4eadcd49a744177bf3f059e7b2f2f52.tar.bz2 mda.lv2-adacb33bf4eadcd49a744177bf3f059e7b2f2f52.zip |
Merge with upstream r2.
git-svn-id: http://svn.drobilla.net/lad/trunk/mda-lv2@2471 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/mdaAmbience.cpp')
-rw-r--r-- | src/mdaAmbience.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/mdaAmbience.cpp b/src/mdaAmbience.cpp index 5794046..dbb50c6 100644 --- a/src/mdaAmbience.cpp +++ b/src/mdaAmbience.cpp @@ -92,6 +92,16 @@ void mdaAmbience::getProgramName(char *name) strcpy(name, programName); } +bool mdaAmbience::getProgramNameIndexed (LvzInt32 category, LvzInt32 index, char* name) +{ + if (index == 0) + { + strcpy(name, programName); + return true; + } + return false; +} + float mdaAmbience::getParameter(LvzInt32 index) { float v=0; @@ -150,14 +160,14 @@ void mdaAmbience::process(float **inputs, float **outputs, LvzInt32 sampleFrames float *out2 = outputs[1]; float a, b, c, d, r; float t, f=fil, fb=fbak, dmp=damp, y=dry, w=wet; - long p=pos, d1, d2, d3, d4; + LvzInt32 p=pos, d1, d2, d3, d4; if(rdy==0) suspend(); - d1 = (p + (long)(107 * size)) & 1023; - d2 = (p + (long)(142 * size)) & 1023; - d3 = (p + (long)(277 * size)) & 1023; - d4 = (p + (long)(379 * size)) & 1023; + d1 = (p + (LvzInt32)(107 * size)) & 1023; + d2 = (p + (LvzInt32)(142 * size)) & 1023; + d3 = (p + (LvzInt32)(277 * size)) & 1023; + d4 = (p + (LvzInt32)(379 * size)) & 1023; --in1; --in2; @@ -218,14 +228,14 @@ void mdaAmbience::processReplacing(float **inputs, float **outputs, LvzInt32 sam float *out2 = outputs[1]; float a, b, r; float t, f=fil, fb=fbak, dmp=damp, y=dry, w=wet; - long p=pos, d1, d2, d3, d4; + LvzInt32 p=pos, d1, d2, d3, d4; if(rdy==0) suspend(); - d1 = (p + (long)(107 * size)) & 1023; - d2 = (p + (long)(142 * size)) & 1023; - d3 = (p + (long)(277 * size)) & 1023; - d4 = (p + (long)(379 * size)) & 1023; + d1 = (p + (LvzInt32)(107 * size)) & 1023; + d2 = (p + (LvzInt32)(142 * size)) & 1023; + d3 = (p + (LvzInt32)(277 * size)) & 1023; + d4 = (p + (LvzInt32)(379 * size)) & 1023; --in1; --in2; |