From bf7b8df028b5eceb227682c668e46a2c5e8b9278 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 6 Dec 2010 03:07:22 +0000 Subject: [PATCH] Fix VST build. git-svn-id: svn://localhost/ardour2/branches/3.0@8195 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/vst_plugin.h | 1 + libs/ardour/vst_plugin.cc | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) 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) {