13
0

fix chaining of masters for boolean controls

This commit is contained in:
Paul Davis 2016-04-23 13:04:08 -04:00
parent 0d62997eab
commit d0f5958542
4 changed files with 10 additions and 9 deletions

View File

@ -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

View File

@ -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) {

View File

@ -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) {

View File

@ -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