From a48888e68830c8fac147c00733e2709bd18986fd Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 19 May 2016 10:44:09 -0400 Subject: add slaved_to() and slaved() methods to VCA --- libs/ardour/ardour/vca.h | 5 +++++ libs/ardour/vca.cc | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) (limited to 'libs/ardour') 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) 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) const +{ + if (!vca || !_gain_control) { + return false; + } + + /* just test one particular control, not all of them */ + + return _gain_control->slaved_to (vca->gain_control()); +} -- cgit v1.2.3