summaryrefslogtreecommitdiff
path: root/libs/surfaces
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-05-02 02:36:53 +0200
committerRobin Gareus <robin@gareus.org>2015-05-02 03:46:49 +0200
commitce259edbcdd4c9a2cd8f2a5daa8b158dd9afc928 (patch)
tree03bfcd5b12a088b1ea941fadd1b4879699b81a07 /libs/surfaces
parent2f432c3be779eb2e8b1915703746853781e0e8a2 (diff)
professionalize peak-meters
The peak meter needs to withstand various test-signals without visual jitter (in particular 1kHz sine) regardless of settings (period-size, sample-rate, custom fall-off). This needs to be done in sync (and not by a random non-rt ‘smoothing’ thread). On the downside this voids the ‘visual smoothing’ particularly with large buffersizes - but then again exactly this “always fall-off no matter what [the next real data will be]” is the problem. One the upside, there’s one less high-frequency (100Hz) thread (Yay!) PS. it probably never worked on windows, anyway. Only peak-meters are affected by his change. K-meters, IEC I/II and VU were never visually smoothed.
Diffstat (limited to 'libs/surfaces')
-rw-r--r--libs/surfaces/control_protocol/control_protocol.cc2
-rw-r--r--libs/surfaces/mackie/strip.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/libs/surfaces/control_protocol/control_protocol.cc b/libs/surfaces/control_protocol/control_protocol.cc
index cd379b10dc..71cae36086 100644
--- a/libs/surfaces/control_protocol/control_protocol.cc
+++ b/libs/surfaces/control_protocol/control_protocol.cc
@@ -281,7 +281,7 @@ ControlProtocol::route_get_peak_input_power (uint32_t table_index, uint32_t whic
return 0.0f;
}
- return r->peak_meter().peak_power (which_input);
+ return r->peak_meter().meter_level (which_input, MeterPeak);
}
diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc
index 23624d12cf..3d3a92987a 100644
--- a/libs/surfaces/mackie/strip.cc
+++ b/libs/surfaces/mackie/strip.cc
@@ -719,7 +719,7 @@ void
Strip::update_meter ()
{
if (_meter && _transport_is_rolling && _metering_active) {
- float dB = const_cast<PeakMeter&> (_route->peak_meter()).peak_power (0);
+ float dB = const_cast<PeakMeter&> (_route->peak_meter()).meter_level (0, MeterPeak);
_meter->send_update (*_surface, dB);
}
}