#include "gtkmm2ext/gui_thread.h"
#include "gtkmm2ext/rgb_macros.h"
+#include "canvas/box.h"
#include "canvas/line.h"
+#include "canvas/meter.h"
#include "canvas/rectangle.h"
#include "canvas/text.h"
#include "canvas.h"
#include "knob.h"
+#include "level_meter.h"
#include "menu.h"
-#include "meter.h"
#include "push2.h"
#include "track_mix.h"
#include "utils.h"
name_text->set_font_description (fd);
name_text->set_position (Duple (10 + (4*Push2Canvas::inter_button_spacing()), 2));
- meter = new Meter (this, 24, 32, Meter::Horizontal, 200);
+ meter = new LevelMeter (p2, this, 200, ArdourCanvas::Meter::Horizontal);
meter->set_position (Duple (10 + (4 * Push2Canvas::inter_button_spacing()), 50));
ControlProtocol::StripableSelectionChanged.connect (selection_connection, invalidator (*this), boost::bind (&TrackMixLayout::selection_changed, this), &p2);
solo_iso_change ();
solo_safe_change ();
monitoring_change ();
+
+ meter->set_meter (stripable->peak_meter ().get());
+ } else {
+ meter->set_meter (0);
}
}
return;
}
- boost::shared_ptr<PeakMeter> peak_meter = stripable->peak_meter ();
-
- if (!peak_meter) {
- return;
- }
-
- const float mpeak = peak_meter->meter_level (0, MeterPeak);
- meter->set (DSP::log_meter (mpeak));
+ meter->update_meters ();
}
class Rectangle;
class Text;
class Line;
+ class VBox;
}
namespace ArdourSurface {
class Push2Knob;
-class Meter;
+class LevelMeter;
class TrackMixLayout : public Push2Layout
{
uint8_t selection_color;
Push2Knob* knobs[8];
- Meter* meter;
+ LevelMeter* meter;
void stripable_property_change (PBD::PropertyChange const& what_changed);
void simple_control_change (boost::shared_ptr<ARDOUR::AutomationControl> ac, Push2::ButtonID bid);