13
0

reset meters when changing metering-point or ports

This commit is contained in:
Robin Gareus 2013-07-05 10:44:09 +02:00
parent b28706852d
commit 398839f6e1

View File

@ -137,6 +137,18 @@ PeakMeter::reflect_inputs (const ChanCount& in)
{ {
current_meters = in; current_meters = in;
const size_t limit = min (_peak_power.size(), (size_t) current_meters.n_total ());
const size_t n_midi = min (_peak_power.size(), (size_t) current_meters.n_midi());
for (size_t n = 0; n < limit; ++n) {
if (n < n_midi) {
_visible_peak_power[n] = 0;
} else {
_visible_peak_power[n] = -INFINITY;
}
}
reset_max();
ConfigurationChanged (in, in); /* EMIT SIGNAL */ ConfigurationChanged (in, in); /* EMIT SIGNAL */
} }