aboutsummaryrefslogtreecommitdiffstats
path: root/src/mdaImage.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-22 21:24:34 +0000
committerDavid Robillard <d@drobilla.net>2010-02-22 21:24:34 +0000
commitadacb33bf4eadcd49a744177bf3f059e7b2f2f52 (patch)
tree922620c99fdc348529002d1a000ec0e8f94f3041 /src/mdaImage.cpp
parent4514036c46168f4bbc693649989d53bdffe6137b (diff)
downloadmda.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/mdaImage.cpp')
-rw-r--r--src/mdaImage.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/mdaImage.cpp b/src/mdaImage.cpp
index a59b1ed..e582c26 100644
--- a/src/mdaImage.cpp
+++ b/src/mdaImage.cpp
@@ -106,6 +106,16 @@ void mdaImage::getProgramName(char *name)
strcpy(name, programName);
}
+bool mdaImage::getProgramNameIndexed (LvzInt32 category, LvzInt32 index, char* name)
+{
+ if (index == 0)
+ {
+ strcpy(name, programName);
+ return true;
+ }
+ return false;
+}
+
float mdaImage::getParameter(LvzInt32 index)
{
float v=0;
@@ -136,7 +146,7 @@ void mdaImage::getParameterName(LvzInt32 index, char *label)
}
#include <stdio.h>
-void long2string(long value, char *string) { sprintf(string, "%ld", value); }
+void int2strng(LvzInt32 value, char *string) { sprintf(string, "%d", value); }
void mdaImage::getParameterDisplay(LvzInt32 index, char *text)
{
@@ -150,11 +160,11 @@ void mdaImage::getParameterDisplay(LvzInt32 index, char *text)
case 3: strcpy(text, "LR->MS"); break;
} break;
- case 1: long2string((long)(400 * fParam2 - 200), text); break;
- case 2: long2string((long)(200 * fParam3 - 100), text); break;
- case 3: long2string((long)(400 * fParam4 - 200), text); break;
- case 4: long2string((long)(200 * fParam5 - 100), text); break;
- case 5: long2string((long)(40 * fParam6 - 20), text); break;
+ case 1: int2strng((LvzInt32)(400 * fParam2 - 200), text); break;
+ case 2: int2strng((LvzInt32)(200 * fParam3 - 100), text); break;
+ case 3: int2strng((LvzInt32)(400 * fParam4 - 200), text); break;
+ case 4: int2strng((LvzInt32)(200 * fParam5 - 100), text); break;
+ case 5: int2strng((LvzInt32)(40 * fParam6 - 20), text); break;
}
}