diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-19 10:44:09 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:43 -0400 |
commit | a48888e68830c8fac147c00733e2709bd18986fd (patch) | |
tree | 8b23cb5ed0a95a84bc2c2bdbe223a5223323ce4b /libs/ardour | |
parent | b2df48263b7a238e1a636a030fda5f18f9ba4054 (diff) |
add slaved_to() and slaved() methods to VCA
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/vca.h | 5 | ||||
-rw-r--r-- | libs/ardour/vca.cc | 22 |
2 files changed, 27 insertions, 0 deletions
diff --git a/libs/ardour/ardour/vca.h b/libs/ardour/ardour/vca.h index d4ee69b702..2814cb68b4 100644 --- a/libs/ardour/ardour/vca.h +++ b/libs/ardour/ardour/vca.h @@ -60,6 +60,11 @@ class LIBARDOUR_API VCA : public Stripable, XMLNode& get_state(); int set_state (XMLNode const&, int version); + /* Slavable API */ + + bool slaved_to (boost::shared_ptr<VCA>) const; + bool slaved () const; + /* Soloable API */ void clear_all_solo_state (); diff --git a/libs/ardour/vca.cc b/libs/ardour/vca.cc index d3c614debf..87853f7850 100644 --- a/libs/ardour/vca.cc +++ b/libs/ardour/vca.cc @@ -172,3 +172,25 @@ VCA::monitoring_state () const /* XXX this has to get more complex but not clear how */ return MonitoringInput; } + +bool +VCA::slaved () const +{ + if (!_gain_control) { + return false; + } + /* just test one particular control, not all of them */ + return _gain_control->slaved (); +} + +bool +VCA::slaved_to (boost::shared_ptr<VCA> vca) const +{ + if (!vca || !_gain_control) { + return false; + } + + /* just test one particular control, not all of them */ + + return _gain_control->slaved_to (vca->gain_control()); +} |