summaryrefslogtreecommitdiff
path: root/libs/ardour/plugin_insert.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-04-29 02:57:42 +0200
committerRobin Gareus <robin@gareus.org>2016-04-29 02:57:42 +0200
commite56c8f0309aa35265785f4a31fac1bd38f868fd1 (patch)
tree4a4fe4300f2db49323f0b7e81a3c06fe2764d3ce /libs/ardour/plugin_insert.cc
parent961e7ecdc8437ecd7d9ec61060083ceb393c8be2 (diff)
don't special case lua processors, use plugin-manager
Diffstat (limited to 'libs/ardour/plugin_insert.cc')
-rw-r--r--libs/ardour/plugin_insert.cc23
1 files changed, 13 insertions, 10 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index d92a758adb..502f581532 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -150,7 +150,6 @@ PluginInsert::set_count (uint32_t num)
void
PluginInsert::set_sinks (const ChanCount& c)
{
- bool changed = (_custom_sinks != c) && _custom_cfg;
_custom_sinks = c;
/* no signal, change will only be visible after re-config */
}
@@ -2117,6 +2116,19 @@ PluginInsert::set_state(const XMLNode& node, int version)
}
#endif
+ if (plugin == 0 && type == ARDOUR::Lua) {
+ /* unique ID (sha1 of script) was not found,
+ * load the plugin from the serialized version in the
+ * session-file instead.
+ */
+ boost::shared_ptr<LuaProc> lp (new LuaProc (_session.engine(), _session, ""));
+ XMLNode *ls = node.child (lp->state_node_name().c_str());
+ if (ls && lp) {
+ lp->set_script_from_state (*ls);
+ plugin = lp;
+ }
+ }
+
if (plugin == 0) {
error << string_compose(
_("Found a reference to a plugin (\"%1\") that is unknown.\n"
@@ -2126,15 +2138,6 @@ PluginInsert::set_state(const XMLNode& node, int version)
return -1;
}
- if (type == ARDOUR::Lua) {
- XMLNode *ls = node.child (plugin->state_node_name().c_str());
- // we need to load the script to set the name and parameters.
- boost::shared_ptr<LuaProc> lp = boost::dynamic_pointer_cast<LuaProc>(plugin);
- if (ls && lp) {
- lp->set_script_from_state (*ls);
- }
- }
-
// The name of the PluginInsert comes from the plugin, nothing else
_name = plugin->get_info()->name;