diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-08-10 18:14:08 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-08-10 18:14:08 -0400 |
commit | 3a648098201bcc6c988034189ec4831e28e20173 (patch) | |
tree | 93e0bca309803864ef4d65b2283859bf196d43a1 /libs | |
parent | 94014dc5d56a5762a0cec83116255ae44ee46527 (diff) |
convert Route::_solo_isolated from counter to a boolean.
This correctly manages the semantics - the counting part is only intended to cover
upstream/downstream effects, not "am i solo-isolated" (similar to self-soloed)
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/route.h | 2 | ||||
-rw-r--r-- | libs/ardour/route.cc | 18 |
2 files changed, 9 insertions, 11 deletions
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index ec6fa8ca8d..64e40e165d 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -546,7 +546,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou bool _self_solo; uint32_t _soloed_by_others_upstream; uint32_t _soloed_by_others_downstream; - uint32_t _solo_isolated; + bool _solo_isolated; uint32_t _solo_isolated_by_upstream; void mod_solo_isolated_by_upstream (bool, void*); diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 34d92b7a7e..f27bed6a6a 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -96,7 +96,7 @@ Route::Route (Session& sess, string name, Flag flg, DataType default_type) , _self_solo (false) , _soloed_by_others_upstream (0) , _soloed_by_others_downstream (0) - , _solo_isolated (0) + , _solo_isolated (false) , _solo_isolated_by_upstream (0) , _denormal_protection (false) , _recordable (true) @@ -989,18 +989,16 @@ Route::set_solo_isolated (bool yn, void *src) bool changed = false; if (yn) { - if (_solo_isolated == 0) { + if (_solo_isolated == false) { _mute_master->set_solo_ignore (true); changed = true; } - _solo_isolated++; + _solo_isolated = true; } else { - if (_solo_isolated > 0) { - _solo_isolated--; - if (_solo_isolated == 0) { - _mute_master->set_solo_ignore (false); - changed = true; - } + if (_solo_isolated == true) { + _solo_isolated = false; + _mute_master->set_solo_ignore (false); + changed = true; } } @@ -1034,7 +1032,7 @@ Route::set_solo_isolated (bool yn, void *src) bool Route::solo_isolated () const { - return (_solo_isolated > 0) || (_solo_isolated_by_upstream > 0); + return (_solo_isolated == true) || (_solo_isolated_by_upstream > 0); } void |