patches need names, that's it

This commit is contained in:
Connor Olding 2014-02-03 15:00:17 -08:00
parent 6d59f4c062
commit a97baa7779
2 changed files with 28 additions and 1 deletions

View file

@ -46,8 +46,8 @@ remember to export `VST_SDK_DIR` to the path of your `vstsdk2.4/`
## TODO
* convert crap\_noise to the template format
* get presets, no pardon me, Banks And Patches working in vst
* rename plugins (fix capitalization consistency and such)
* make style consistent
* remove crap\_ prefixes?
* move to subdirs?
* make crap faster (hand-written SSE2? compiler directives?)

View file

@ -21,6 +21,9 @@ public:
bool setProcessPrecision(VstInt32 precision);
void setSampleRate(float);
void setProgramName(char *);
void getProgramName(char *);
bool getProgramNameIndexed(VstInt32, VstInt32, char *);
bool getEffectName(char *);
bool getVendorString(char *);
bool getProductString(char *);
@ -35,6 +38,8 @@ public:
#endif
private:
char programName[kVstMaxProgNameLen];
#if (PARAMETERS > 0)
param params[PARAMETERS];
#endif
@ -54,6 +59,8 @@ plugin::plugin(audioMasterCallback audioMaster)
setNumOutputs(2);
setUniqueID(ID);
canProcessReplacing();
canDoubleReplacing();
vst_strncpy(programName, "Init", kVstMaxProgNameLen);
#if (PARAMETERS > 0)
::construct_params(params);
#endif
@ -131,6 +138,26 @@ plugin::getVendorString(char *text)
return true;
}
void
plugin::setProgramName (char *text)
{
vst_strncpy(programName, text, kVstMaxProgNameLen);
}
void
plugin::getProgramName (char *text)
{
vst_strncpy(text, programName, kVstMaxProgNameLen);
}
bool
plugin::getProgramNameIndexed(VstInt32 category, VstInt32 index, char *text)
{
if (index != 0) return false;
vst_strncpy(text, programName, kVstMaxProgNameLen);
return true;
}
#if (PARAMETERS > 0)
void
plugin::setParameter(VstInt32 index, float value)