#include <limits.h>
#include "ardour/meter.h"
+#include "ardour/logmeter.h"
#include <gtkmm2ext/utils.h>
#include "pbd/fastlog.h"
#include "level_meter.h"
#include "utils.h"
-#include "logmeter.h"
#include "gui_thread.h"
#include "keyboard.h"
#include "public_editor.h"
#include "ui_config.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace ARDOUR;
using namespace ARDOUR_UI_UTILS;
, max_peak (minus_infinity())
, meter_type (MeterPeak)
, visible_meter_type (MeterType(0))
+ , midi_count (0)
, meter_count (0)
, max_visible_meters (0)
, color_changed (false)
return; /* do it later or never */
}
- int32_t nmidi = _meter->input_streams().n_midi();
+ uint32_t nmidi = _meter->input_streams().n_midi();
uint32_t nmeters = _meter->input_streams().n_total();
regular_meter_width = initial_width;
thin_meter_width = thin_width;
width = rint (width * UIConfiguration::instance().get_ui_scale());
if ( meters.size() > 0
+ && nmidi == midi_count
&& nmeters == meter_count
&& meters[0].width == width
&& meters[0].length == len
b[1] = UIConfiguration::instance().color ("meter background top");
b[2] = 0x991122ff; // red highlight gradient Bot
b[3] = 0x551111ff; // red highlight gradient Top
- if (n < nmidi) {
+ if ((uint32_t) n < nmidi) {
c[0] = UIConfiguration::instance().color ("midi meter color0");
c[1] = UIConfiguration::instance().color ("midi meter color1");
c[2] = UIConfiguration::instance().color ("midi meter color2");
}
}
}
- if (meters[n].width != width || meters[n].length != len || color_changed || meter_type != visible_meter_type) {
+ if (meters[n].width != width || meters[n].length != len || color_changed || meter_type != visible_meter_type || nmidi != midi_count) {
bool hl = meters[n].meter ? meters[n].meter->get_highlight() : false;
meters[n].packed = false;
delete meters[n].meter;
//show();
color_changed = false;
visible_meter_type = meter_type;
+ midi_count = nmidi;
meter_count = nmeters;
}