make mackie surfaces aware of VCAs
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 16 May 2016 21:48:33 +0000 (17:48 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 May 2016 19:30:42 +0000 (15:30 -0400)
libs/surfaces/mackie/mackie_control_protocol.cc
libs/surfaces/mackie/mackie_control_protocol.h

index 4348d2e61497c443011798aa8ef4ef4918d82a49..fbd6f286bcec9433cc332f4d13c571ff3f1f9db1 100644 (file)
@@ -59,6 +59,7 @@
 #include "ardour/track.h"
 #include "ardour/types.h"
 #include "ardour/audioengine.h"
+#include "ardour/vca_manager.h"
 
 #include "mackie_control_protocol.h"
 
@@ -699,7 +700,7 @@ MackieControlProtocol::connect_session_signals()
        // receive routes added
        session->RouteAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_routes_added, this, _1), this);
        // receive VCAs added
-       //session->RoutesAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_stripable_added, this, _1), this);
+       session->vca_manager().VCAAdded.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_vca_added, this, _1), this);
 
        // receive record state toggled
        session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_record_state_changed, this), this);
@@ -1243,6 +1244,12 @@ MackieControlProtocol::notify_stripable_removed ()
        }
 }
 
+void
+MackieControlProtocol::notify_vca_added (ARDOUR::VCAList& vl)
+{
+       refresh_current_bank ();
+}
+
 // RouteList is the set of Routes that have just been added
 void
 MackieControlProtocol::notify_routes_added (ARDOUR::RouteList & rl)
index 73d2f9174e65864841608ef3fa8a7825021b608b..647d2fcdb38f3a80014fcf69dea6dca728a78f6f 100644 (file)
@@ -188,6 +188,7 @@ class MackieControlProtocol
        void notify_subview_stripable_deleted ();
        void notify_stripable_removed ();
        void notify_routes_added (ARDOUR::RouteList &);
+       void notify_vca_added (ARDOUR::VCAList &);
 
        void notify_presentation_info_changed();