diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-04-01 01:24:13 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-04-01 01:24:13 +0000 |
commit | c0c617902e03db2a75e8733dcc9982a575c2366a (patch) | |
tree | 6c415257fa82d2af9fad773565b36d95c076469e /libs/ardour/plugin_insert.cc | |
parent | 50dd880d7e75b49e7c80c79f32165a756839651c (diff) |
revisit setting up processors during route construction; remove several more XML-based constructors; don't put () parens around inactive plugin names (we have a checkbox); improve management of send, return and insert bitslot IDs; clean up Diskstream construction a bit more
git-svn-id: svn://localhost/ardour2/branches/3.0@6819 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/plugin_insert.cc')
-rw-r--r-- | libs/ardour/plugin_insert.cc | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index af908a2036..ddc69a74ac 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -62,35 +62,16 @@ using namespace PBD; const string PluginInsert::port_automation_node_name = "PortAutomation"; PluginInsert::PluginInsert (Session& s, boost::shared_ptr<Plugin> plug) - : Processor (s, plug->name()) + : Processor (s, (plug ? plug->name() : string ("toBeRenamed"))) , _signal_analysis_collected_nframes(0) , _signal_analysis_collect_nframes_max(0) { /* the first is the master */ - _plugins.push_back (plug); - set_automatable (); + if (plug) { + _plugins.push_back (plug); + set_automatable (); - { - Glib::Mutex::Lock em (_session.engine().process_lock()); - IO::PortCountChanged (max(input_streams(), output_streams())); - } - - ProcessorCreated (this); /* EMIT SIGNAL */ -} - -PluginInsert::PluginInsert (Session& s, const XMLNode& node) - : Processor (s, "unnamed plugin insert"), - _signal_analysis_collected_nframes(0), - _signal_analysis_collect_nframes_max(0) -{ - if (set_state (node, Stateful::loading_state_version)) { - throw failed_constructor(); - } - - _pending_active = _active; - - { Glib::Mutex::Lock em (_session.engine().process_lock()); IO::PortCountChanged (max(input_streams(), output_streams())); } @@ -810,6 +791,8 @@ PluginInsert::set_state(const XMLNode& node, int version) } } + Processor::set_state (node, version); + if (version < 3000) { for (niter = nlist.begin(); niter != nlist.end(); ++niter) { @@ -823,13 +806,20 @@ PluginInsert::set_state(const XMLNode& node, int version) set_parameter_state_2X (node, version); } else { - Processor::set_state (node, version); + set_parameter_state (node, version); } // The name of the PluginInsert comes from the plugin, nothing else _name = plugin->get_info()->name; + /* catch up on I/O */ + + { + Glib::Mutex::Lock em (_session.engine().process_lock()); + IO::PortCountChanged (max(input_streams(), output_streams())); + } + return 0; } |