add slaved_to() and slaved() methods to VCA
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 19 May 2016 14:44:09 +0000 (10:44 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 May 2016 19:30:43 +0000 (15:30 -0400)
libs/ardour/ardour/vca.h
libs/ardour/vca.cc

index d4ee69b7024d75dcc01eaaaa1994e2ca835952ca..2814cb68b40e73cb5ec0b4b9fb91d63c53730b96 100644 (file)
@@ -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 ();
index d3c614debf27849da3a572ddfd7fb3a8669118ee..87853f7850995c57a7b1f43a971ba2fba7dcc722 100644 (file)
@@ -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());
+}