summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-04-23 13:04:08 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:41 -0400
commitd0f5958542a54bb7d463323be532e48540c84789 (patch)
tree1a36f4accc7db5607a100e0f097d57afb2aac574
parent0d62997eabf08397ea2c0c70e808abd4e79bcdbd (diff)
fix chaining of masters for boolean controls
-rw-r--r--libs/ardour/mute_control.cc4
-rw-r--r--libs/ardour/slavable_automation_control.cc4
-rw-r--r--libs/ardour/solo_control.cc6
-rw-r--r--libs/ardour/solo_isolate_control.cc5
4 files changed, 10 insertions, 9 deletions
diff --git a/libs/ardour/mute_control.cc b/libs/ardour/mute_control.cc
index d44189e36b..a3f46ffa06 100644
--- a/libs/ardour/mute_control.cc
+++ b/libs/ardour/mute_control.cc
@@ -120,7 +120,7 @@ double
MuteControl::get_value () const
{
if (slaved ()) {
- return get_masters_value ();
+ return muted_by_self() || get_masters_value ();
}
if (_list && boost::dynamic_pointer_cast<AutomationList>(_list)->automation_playback()) {
@@ -128,7 +128,7 @@ MuteControl::get_value () const
return AutomationControl::get_value();
}
- return muted() ? 1.0 : 0.0;
+ return muted();
}
void
diff --git a/libs/ardour/slavable_automation_control.cc b/libs/ardour/slavable_automation_control.cc
index 03662c1a26..80da038afe 100644
--- a/libs/ardour/slavable_automation_control.cc
+++ b/libs/ardour/slavable_automation_control.cc
@@ -127,7 +127,9 @@ SlavableAutomationControl::add_master (boost::shared_ptr<AutomationControl> m)
/* ratio will be recomputed below */
- res = _masters.insert (make_pair<PBD::ID,MasterRecord> (m->id(), MasterRecord (m, 1.0)));
+ PBD::ID id (m->id());
+
+ res = _masters.insert (make_pair<PBD::ID,MasterRecord> (id, MasterRecord (m, 1.0)));
if (res.second) {
diff --git a/libs/ardour/solo_control.cc b/libs/ardour/solo_control.cc
index 8514da36ec..f0dd07d628 100644
--- a/libs/ardour/solo_control.cc
+++ b/libs/ardour/solo_control.cc
@@ -177,8 +177,7 @@ double
SoloControl::get_value () const
{
if (slaved()) {
- Glib::Threads::RWLock::ReaderLock lm (master_lock);
- return get_masters_value_locked () ? 1.0 : 0.0;
+ return self_soloed() || get_masters_value ();
}
if (_list && boost::dynamic_pointer_cast<AutomationList>(_list)->automation_playback()) {
@@ -186,7 +185,7 @@ SoloControl::get_value () const
return AutomationControl::get_value();
}
- return soloed() ? 1.0 : 0.0;
+ return soloed();
}
void
@@ -257,6 +256,7 @@ SoloControl::master_changed (bool /*from self*/, GroupControlDisposition, boost:
_transition_into_solo = 0;
+
if (m->get_value()) {
/* this master is now enabled */
if (!self_soloed() && get_boolean_masters() == 0) {
diff --git a/libs/ardour/solo_isolate_control.cc b/libs/ardour/solo_isolate_control.cc
index a913a9810e..25bb5e723e 100644
--- a/libs/ardour/solo_isolate_control.cc
+++ b/libs/ardour/solo_isolate_control.cc
@@ -146,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()) {
@@ -155,7 +154,7 @@ SoloIsolateControl::get_value () const
return AutomationControl::get_value();
}
- return solo_isolated () ? 1.0 : 0.0;
+ return solo_isolated ();
}
int