summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-12-06 03:07:22 +0000
committerCarl Hetherington <carl@carlh.net>2010-12-06 03:07:22 +0000
commitbf7b8df028b5eceb227682c668e46a2c5e8b9278 (patch)
treeb419c4ab14bf4610030eee5317af881b97001223 /libs
parent5f00efd7e87fdf66c46eb59e1af3010ed900e0e7 (diff)
Fix VST build.
git-svn-id: svn://localhost/ardour2/branches/3.0@8195 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/vst_plugin.h1
-rw-r--r--libs/ardour/vst_plugin.cc13
2 files changed, 13 insertions, 1 deletions
diff --git a/libs/ardour/ardour/vst_plugin.h b/libs/ardour/ardour/vst_plugin.h
index f78f3e687c..a72b625288 100644
--- a/libs/ardour/ardour/vst_plugin.h
+++ b/libs/ardour/ardour/vst_plugin.h
@@ -81,6 +81,7 @@ class VSTPlugin : public ARDOUR::Plugin
bool load_preset (const std::string& preset_label);
bool save_preset (std::string name);
+ void remove_preset (std::string name);
bool has_editor () const;
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc
index ee7c165fb3..d01a70239a 100644
--- a/libs/ardour/vst_plugin.cc
+++ b/libs/ardour/vst_plugin.cc
@@ -182,7 +182,7 @@ VSTPlugin::get_state()
for (int32_t n = 0; n < _plugin->numParams; ++n) {
char index[64];
char val[32];
- snprintf (index, sizeof (index), "param_%ld", n);
+ snprintf (index, sizeof (index), "param_%d", n);
snprintf (val, sizeof (val), "%.12g", _plugin->getParameter (_plugin, n));
parameters->add_property (index, val);
}
@@ -349,6 +349,17 @@ VSTPlugin::save_preset (string name)
return Plugin::save_preset (name, "vst");
}
+void
+VSTPlugin::remove_preset (string name)
+{
+ if (_plugin->flags & 32 /* effFlagsProgramsChunks */) {
+ error << _("no support for presets using chunks at this time")
+ << endmsg;
+ return;
+ }
+ Plugin::remove_preset (name, "vst");
+}
+
string
VSTPlugin::describe_parameter (Evoral::Parameter param)
{