summaryrefslogtreecommitdiff
path: root/libs/ardour/plugin_insert.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-08-25 19:27:41 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-08-25 19:27:41 +0000
commit2ba08927bd1e1be97876b267c46e75e074f21e18 (patch)
treef514844fef7cb0924e7ba8fb45bdee4551353b4f /libs/ardour/plugin_insert.cc
parentafcbdcf850fc8e279a56e6efd6c7cb32a728c3ae (diff)
strip no-longer used code related to plugin parameter state
git-svn-id: svn://localhost/ardour2/branches/3.0@7688 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/plugin_insert.cc')
-rw-r--r--libs/ardour/plugin_insert.cc70
1 files changed, 5 insertions, 65 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index 108a7e03aa..7174963ca8 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -789,6 +789,10 @@ PluginInsert::set_state(const XMLNode& node, int version)
if (version < 3000) {
+ /* Only 2.X sessions need a call to set_parameter_state() - in 3.X and above
+ this is all handled by Automatable
+ */
+
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
if ((*niter)->name() == "Redirect") {
/* XXX do we need to tackle placement? i think not (pd; oct 16 2009) */
@@ -797,11 +801,7 @@ PluginInsert::set_state(const XMLNode& node, int version)
}
}
- // set_parameter_state_2X (node, version);
-
- } else {
-
- // set_parameter_state (node, version);
+ set_parameter_state_2X (node, version);
}
// The name of the PluginInsert comes from the plugin, nothing else
@@ -818,66 +818,6 @@ PluginInsert::set_state(const XMLNode& node, int version)
}
void
-PluginInsert::set_parameter_state (const XMLNode& node, int version)
-{
- XMLNodeList nlist = node.children();
- XMLNodeIterator niter;
-
- for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
-
- if ((*niter)->name() != port_automation_node_name) {
- continue;
- }
-
- XMLNodeList cnodes;
- XMLProperty *cprop;
- XMLNodeConstIterator iter;
- XMLNode *child;
- const char *port;
- uint32_t port_id;
-
- cnodes = (*niter)->children ("AutomationList");
-
- for (iter = cnodes.begin(); iter != cnodes.end(); ++iter) {
-
- child = *iter;
-
- /* XXX this code knows way too much about the internal details of an AutomationList state node */
-
- if ((cprop = child->property("automation-id")) != 0) {
- port = cprop->value().c_str();
- } else {
- warning << _("PluginInsert: Auto: no plugin parameter number seen") << endmsg;
- continue;
- }
-
- if (sscanf (port, "parameter-%" PRIu32, &port_id) != 1) {
- warning << _("PluginInsert: Auto: no parameter number found") << endmsg;
- continue;
- }
-
- if (port_id >= _plugins[0]->parameter_count()) {
- warning << _("PluginInsert: Auto: plugin parameter out of range") << endmsg;
- continue;
- }
-
- boost::shared_ptr<AutomationControl> c = boost::dynamic_pointer_cast<AutomationControl>(
- control(Evoral::Parameter(PluginAutomation, 0, port_id), true));
-
- if (c) {
- c->alist()->set_state (*child, version);
- } else {
- error << string_compose (_("PluginInsert: automatable control %1 not found - ignored"), port_id) << endmsg;
- }
- }
-
- /* done */
-
- break;
- }
-}
-
-void
PluginInsert::set_parameter_state_2X (const XMLNode& node, int version)
{
XMLNodeList nlist = node.children();