allow to customize variable i/o plugin inputs
[ardour.git] / libs / ardour / processor.cc
index fa6cab579ad7cff165ddc111c4beba1afc6fadae..d3ffe152cb7d24534cf2c742fcac553c5a86a221 100644 (file)
@@ -64,6 +64,7 @@ Processor::Processor(Session& session, const string& name)
        , _pre_fader (false)
        , _ui_pointer (0)
        , _window_proxy (0)
+       , _pinmgr_proxy (0)
        , _owner (0)
 {
 }
@@ -81,6 +82,7 @@ Processor::Processor (const Processor& other)
        , _pre_fader (false)
        , _ui_pointer (0)
        , _window_proxy (0)
+       , _pinmgr_proxy (0)
        , _owner (0)
 {
 }
@@ -124,6 +126,8 @@ Processor::state (bool full_state)
                XMLNode& automation = Automatable::get_automation_xml_state();
                if (!automation.children().empty() || !automation.properties().empty()) {
                        node->add_child_nocopy (automation);
+               } else {
+                       delete &automation;
                }
        }
 
@@ -139,15 +143,15 @@ Processor::set_state_2X (const XMLNode & node, int /*version*/)
        XMLProperty const * prop;
 
        XMLNodeList children = node.children ();
-       
+
        for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) {
 
                if ((*i)->name() == X_("IO")) {
-                       
+
                        if ((prop = (*i)->property ("name")) != 0) {
                                set_name (prop->value ());
                        }
-                       
+
                        set_id (**i);
 
                        //note:  in A2, active state was stored in the Redirect node, not the child IO node
@@ -162,7 +166,7 @@ Processor::set_state_2X (const XMLNode & node, int /*version*/)
                                        }
                                }
                        }*/
-                       
+
                }
        }
 
@@ -188,7 +192,7 @@ Processor::set_state (const XMLNode& node, int version)
                        */
                        Processor::set_name (prop->value());
                }
-               
+
                set_id (node);
        }
 
@@ -225,7 +229,7 @@ Processor::set_state (const XMLNode& node, int version)
                }
        }
 
-       bool const a = string_is_affirmative (prop->value ());
+       bool const a = string_is_affirmative (prop->value ()) && !_session.get_bypass_all_loaded_plugins();
        if (_active != a) {
                if (a) {
                        activate ();
@@ -277,12 +281,6 @@ Processor::set_ui (void* p)
        _ui_pointer = p;
 }
 
-void
-Processor::set_window_proxy (ProcessorWindowProxy* wp)
-{
-       _window_proxy = wp;
-}
-
 void
 Processor::set_owner (SessionObject* o)
 {