Expose Latch automation mode to MCUs
[ardour.git] / libs / surfaces / mackie / meter.h
index 7110f044166bc0867ed4e66d5f451433f7a7007b..17972fb480f98d8e4a8586881479f7b67f0a3c27 100644 (file)
@@ -23,6 +23,8 @@
 #include "controls.h"
 #include "midi_byte_array.h"
 
+namespace ArdourSurface {
+
 namespace Mackie {
 
 class SurfacePort;
@@ -32,21 +34,25 @@ class Meter : public Control
 public:
        Meter (int id, std::string name, Group & group)
                : Control  (id, name, group)
-               , last_segment_value_sent (-1)
+               , _enabled (false)
                , overload_on (false) {}
-       
-       virtual type_t type() const { return type_meter; }
 
-       MidiByteArray update_message (float dB);
+
+       void send_update (Surface&, float dB);
+       bool enabled () const { return _enabled; }
+
+       MidiByteArray zero();
 
        static Control* factory (Surface&, int id, const char*, Group&);
-       
-       int last_segment_value_sent;
+
+       void notify_metering_state_changed(Surface& surface, bool transport_is_rolling, bool metering_active);
 
   private:
+       bool _enabled;
        bool overload_on;
 };
 
-}
+} // Mackie namespace
+} // ArdourSurface namespace
 
 #endif /* __ardour_mackie_control_protocol_meter_h__ */