From ad06e7cb8dd2add700d8a83c2b9cb7352d122bce Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 8 Apr 2012 23:20:14 +0000 Subject: [PATCH] MCP: make Strip aware of Meter git-svn-id: svn://localhost/ardour2/branches/3.0@11841 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/surfaces/mackie/controls.cc | 2 ++ libs/surfaces/mackie/controls.h | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/surfaces/mackie/controls.cc b/libs/surfaces/mackie/controls.cc index f59f57b8e0..42bcc3a09b 100644 --- a/libs/surfaces/mackie/controls.cc +++ b/libs/surfaces/mackie/controls.cc @@ -93,6 +93,8 @@ void Strip::add (Control & control) _vselect = reinterpret_cast(&control); } else if (control.name() == "fader_touch") { _fader_touch = reinterpret_cast(&control); + } else if (control.name() == "meter") { + _meter = reinterpret_cast(&control); } else if (control.type() == Control::type_led || control.type() == Control::type_led_ring) { // relax } else { diff --git a/libs/surfaces/mackie/controls.h b/libs/surfaces/mackie/controls.h index 7f756ae2fd..8d45ea63bc 100644 --- a/libs/surfaces/mackie/controls.h +++ b/libs/surfaces/mackie/controls.h @@ -68,6 +68,7 @@ private: class Button; class Pot; class Fader; +class Meter; struct StripControlDefinition { const char* name; @@ -103,7 +104,8 @@ public: Button & fader_touch(); Pot & vpot(); Fader & gain(); - + Meter& meter (); + bool has_solo() const { return _solo != 0; } bool has_recenable() const { return _recenable != 0; } bool has_mute() const { return _mute != 0; } @@ -112,7 +114,7 @@ public: bool has_fader_touch() const { return _fader_touch != 0; } bool has_vpot() const { return _vpot != 0; } bool has_gain() const { return _gain != 0; } - + bool has_meter() const { return _meter != 0; } private: Button* _solo; Button* _recenable; @@ -122,6 +124,7 @@ private: Button* _fader_touch; Pot* _vpot; Fader* _gain; + Meter* _meter; int _index; };