diff --git a/libs/surfaces/push2/level_meter.cc b/libs/surfaces/push2/level_meter.cc index 212644ae0c..019c2a5e3e 100644 --- a/libs/surfaces/push2/level_meter.cc +++ b/libs/surfaces/push2/level_meter.cc @@ -51,7 +51,6 @@ LevelMeter::LevelMeter (Push2& p, Item* parent, int len, Meter::Orientation o) , meter_length (len) , thin_meter_width(2) , max_peak (minus_infinity()) - , meter_type (MeterPeak) , visible_meter_type (MeterType(0)) , midi_count (0) , meter_count (0) @@ -89,7 +88,7 @@ LevelMeter::set_meter (PeakMeter* meter) if (_meter) { _meter->ConfigurationChanged.connect (_configuration_connection, invalidator(*this), boost::bind (&LevelMeter::configuration_changed, this, _1, _2), &p2); - _meter->TypeChanged.connect (_meter_type_connection, invalidator (*this), boost::bind (&LevelMeter::meter_type_changed, this, _1), &p2); + _meter->MeterTypeChanged.connect (_meter_type_connection, invalidator (*this), boost::bind (&LevelMeter::meter_type_changed, this, _1), &p2); } setup_meters (meter_length, regular_meter_width, thin_meter_width); @@ -161,6 +160,7 @@ LevelMeter::update_meters () if (n < nmidi) { (*i).meter->set (_meter->meter_level (n, MeterPeak)); } else { + MeterType meter_type = _meter->meter_type (); const float peak = _meter->meter_level (n, meter_type); if (meter_type == MeterPeak) { (*i).meter->set (log_meter (peak)); @@ -226,7 +226,6 @@ LevelMeter::configuration_changed (ChanCount /*in*/, ChanCount /*out*/) void LevelMeter::meter_type_changed (MeterType t) { - meter_type = t; setup_meters (meter_length, regular_meter_width, thin_meter_width); } @@ -261,6 +260,7 @@ LevelMeter::setup_meters (int len, int initial_width, int thin_width) return; /* do it later or never */ } + MeterType meter_type = _meter->meter_type (); uint32_t nmidi = _meter->input_streams().n_midi(); uint32_t nmeters = _meter->input_streams().n_total(); regular_meter_width = initial_width; @@ -482,13 +482,6 @@ LevelMeter::setup_meters (int len, int initial_width, int thin_width) meter_count = nmeters; } -void -LevelMeter::set_type(MeterType t) -{ - meter_type = t; - _meter->set_type(t); -} - void LevelMeter::clear_meters (bool reset_highlight) { for (vector::iterator i = meters.begin(); i < meters.end(); i++) { diff --git a/libs/surfaces/push2/level_meter.h b/libs/surfaces/push2/level_meter.h index 04f4ca21fe..19323072e9 100644 --- a/libs/surfaces/push2/level_meter.h +++ b/libs/surfaces/push2/level_meter.h @@ -54,8 +54,6 @@ class LevelMeter : public ArdourCanvas::Container, public sigc::trackable void setup_meters (int len=0, int width=3, int thin=2); void set_max_audio_meter_count (uint32_t cnt = 0); - void set_type (ARDOUR::MeterType); - ARDOUR::MeterType get_type () { return meter_type; } private: Push2& p2; @@ -84,7 +82,6 @@ class LevelMeter : public ArdourCanvas::Container, public sigc::trackable guint16 thin_meter_width; std::vector meters; float max_peak; - ARDOUR::MeterType meter_type; ARDOUR::MeterType visible_meter_type; uint32_t midi_count; uint32_t meter_count;