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 */
}
}
#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"
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;