summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/meter.cc22
-rw-r--r--libs/ardour/route.cc3
-rw-r--r--libs/ardour/track.cc3
3 files changed, 13 insertions, 15 deletions
diff --git a/libs/ardour/meter.cc b/libs/ardour/meter.cc
index 3c2d28ef1b..0c23ea168d 100644
--- a/libs/ardour/meter.cc
+++ b/libs/ardour/meter.cc
@@ -186,20 +186,20 @@ PeakMeter::configure_io (ChanCount in, ChanCount out)
void
PeakMeter::reflect_inputs (const ChanCount& in)
{
- current_meters = in;
-
- const size_t limit = min (_peak_signal.size(), (size_t) current_meters.n_total ());
- const size_t n_midi = min (_peak_signal.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;
+ for (uint32_t i = in.n_total(); i < current_meters.n_total(); ++i) {
+ if (i < _peak_signal.size()) {
+ _peak_signal[i] = 0.0f;
}
}
+ for (uint32_t i = in.n_audio(); i < current_meters.n_audio(); ++i) {
+ if (i >= _kmeter.size()) continue;
+ _kmeter[i]->reset();
+ _iec1meter[i]->reset();
+ _iec2meter[i]->reset();
+ _vumeter[i]->reset();
+ }
- reset();
+ current_meters = in;
reset_max();
ConfigurationChanged (in, in); /* EMIT SIGNAL */
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 5c794fb379..dad1922488 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -3152,9 +3152,6 @@ Route::set_meter_point (MeterPoint p, bool force)
*/
}
- _meter->reset();
- _meter->reset_max();
-
meter_change (); /* EMIT SIGNAL */
bool const meter_visibly_changed = (_meter->display_to_user() != meter_was_visible_to_user);
diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc
index c6a348ddfb..5dfc956c75 100644
--- a/libs/ardour/track.cc
+++ b/libs/ardour/track.cc
@@ -436,7 +436,8 @@ Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
}
if (no_meter) {
- _meter->reset();
+ BufferSet& bufs (_session.get_silent_buffers (n_process_buffers()));
+ _meter->run (bufs, 0, 0, nframes, true);
_input->process_input (boost::shared_ptr<Processor>(), start_frame, end_frame, nframes);
} else {
_input->process_input (_meter, start_frame, end_frame, nframes);