fix bypassing plugins with sidechain i/o
[ardour.git] / libs / ardour / solo_isolate_control.cc
index 13770b174e616b8b673e3067782cf261ea17c0fe..25bb5e723ec255abda8cea27d3b4592391b17258 100644 (file)
@@ -28,7 +28,7 @@ using namespace std;
 using namespace PBD;
 
 SoloIsolateControl::SoloIsolateControl (Session& session, std::string const & name, Soloable& s, Muteable& m)
-       : SlavableAutomationControl (session, SoloAutomation, ParameterDescriptor (SoloIsolateAutomation),
+       : SlavableAutomationControl (session, SoloIsolateAutomation, ParameterDescriptor (SoloIsolateAutomation),
                                     boost::shared_ptr<AutomationList>(new AutomationList(Evoral::Parameter(SoloIsolateAutomation))),
                                     name)
        , _soloable (s)
@@ -97,7 +97,7 @@ SoloIsolateControl::actually_set_value (double val, PBD::Controllable::GroupCont
                return;
        }
 
-       set_solo_isolated (val == 0.0 ? false : true, gcd);
+       set_solo_isolated (val, gcd);
 
        /* this sets the Evoral::Control::_user_value for us, which will
           be retrieved by AutomationControl::get_value (), and emits Changed
@@ -110,7 +110,7 @@ SoloIsolateControl::actually_set_value (double val, PBD::Controllable::GroupCont
 void
 SoloIsolateControl::set_solo_isolated (bool yn, Controllable::GroupControlDisposition group_override)
 {
-       if (_soloable.can_solo()) {
+       if (!_soloable.can_solo()) {
                return;
        }
 
@@ -130,7 +130,6 @@ SoloIsolateControl::set_solo_isolated (bool yn, Controllable::GroupControlDispos
                }
        }
 
-
        if (!changed) {
                return;
        }
@@ -147,8 +146,7 @@ double
 SoloIsolateControl::get_value () const
 {
        if (slaved()) {
-               Glib::Threads::RWLock::ReaderLock lm (master_lock);
-               return get_masters_value_locked () ? 1.0 : 0.0;
+               return solo_isolated() || get_masters_value ();
        }
 
        if (_list && boost::dynamic_pointer_cast<AutomationList>(_list)->automation_playback()) {
@@ -156,7 +154,7 @@ SoloIsolateControl::get_value () const
                return AutomationControl::get_value();
        }
 
-       return solo_isolated () ? 1.0 : 0.0;
+       return solo_isolated ();
 }
 
 int