extensive changes to PresentationInfo API
[ardour.git] / libs / ardour / processor.cc
index fa6cab579ad7cff165ddc111c4beba1afc6fadae..f13edb516532c7bfa84cf79d2422e8d495884dee 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*/)
                                        }
                                }
                        }*/
-                       
+
                }
        }
 
@@ -176,8 +180,8 @@ Processor::set_state (const XMLNode& node, int version)
                return set_state_2X (node, version);
        }
 
-       const XMLProperty *prop;
-       const XMLProperty *legacy_active = 0;
+       XMLProperty const * prop;
+       XMLProperty const * legacy_active = 0;
        bool leave_name_alone = (node.property ("ignore-name") != 0);
 
        if (!leave_name_alone) {
@@ -188,7 +192,7 @@ Processor::set_state (const XMLNode& node, int version)
                        */
                        Processor::set_name (prop->value());
                }
-               
+
                set_id (node);
        }
 
@@ -201,7 +205,7 @@ Processor::set_state (const XMLNode& node, int version)
 
                if ((*niter)->name() == X_("Automation")) {
 
-                       XMLProperty *prop;
+                       XMLProperty const * prop;
 
                        if ((prop = (*niter)->property ("path")) != 0) {
                                old_set_automation_state (*(*niter));
@@ -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)
 {