diff options
author | David Robillard <d@drobilla.net> | 2011-04-03 01:57:12 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-04-03 01:57:12 +0000 |
commit | 4ae4704112fcbd5f4eacf5947fc1ffca06c630d5 (patch) | |
tree | 5b832d5c8d2fd52e05cdad10497f2b4cc7c32bfa /libs/ardour/plugin_insert.cc | |
parent | 05d88018128bbcfd8e7510e9a9f0b99a1ff6f5d1 (diff) |
Implement LV2 files extension.
This extension works with the persist extension to allow plugins to
save references to files in their state, but still allow the host
(e.g. Ardour) to control where files are located, making it possible
to do a deep export of a session with all files (e.g. loaded sampler
banks) included.
Tested working with a patched version of LinuxSampler...
TODO: Make symlinks in the plugin state directory rather than refer
to absolute file paths in state files (i.e. support session export,
either by ardour or any other tool, in particular the Jack session
manager...)
git-svn-id: svn://localhost/ardour2/branches/3.0@9272 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/plugin_insert.cc')
-rw-r--r-- | libs/ardour/plugin_insert.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index b7d95d9483..71205c2c74 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -70,6 +70,7 @@ PluginInsert::PluginInsert (Session& s, boost::shared_ptr<Plugin> plug) /* the first is the master */ if (plug) { + plug->set_insert_info (this); _plugins.push_back (plug); set_automatable (); @@ -847,13 +848,13 @@ PluginInsert::set_state(const XMLNode& node, int version) } } - boost::shared_ptr<Plugin> plugin; - - plugin = find_plugin (_session, prop->value(), type); + boost::shared_ptr<Plugin> plugin = find_plugin (_session, prop->value(), type); if (plugin == 0) { - error << string_compose(_("Found a reference to a plugin (\"%1\") that is unknown.\n" - "Perhaps it was removed or moved since it was last used."), prop->value()) + error << string_compose( + _("Found a reference to a plugin (\"%1\") that is unknown.\n" + "Perhaps it was removed or moved since it was last used."), + prop->value()) << endmsg; return -1; } @@ -868,6 +869,8 @@ PluginInsert::set_state(const XMLNode& node, int version) need_automatables = true; } + Processor::set_state (node, version); + if ((prop = node.property ("count")) != 0) { sscanf (prop->value().c_str(), "%u", &count); } @@ -898,8 +901,6 @@ PluginInsert::set_state(const XMLNode& node, int version) } } - Processor::set_state (node, version); - if (version < 3000) { /* Only 2.X sessions need a call to set_parameter_state() - in 3.X and above @@ -1167,6 +1168,7 @@ PluginInsert::collect_signal_for_analysis (framecnt_t nframes) void PluginInsert::add_plugin_with_activation (boost::shared_ptr<Plugin> plugin) { + plugin->set_insert_info (this); _plugins.push_back (plugin); if (active()) { plugin->activate (); |