From d3561e8cf1d5a289ff2ce4a26e4a970437a812d5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 29 Nov 2020 16:55:25 +0100 Subject: Remove flaky DSP load meter This never worked particularly well, and the underlying API is more or less useless with Jack 2. So, just replace it with a dropout counter. --- src/JackDriver.cpp | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) (limited to 'src/JackDriver.cpp') diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp index aca6b65..b30d45f 100644 --- a/src/JackDriver.cpp +++ b/src/JackDriver.cpp @@ -359,9 +359,6 @@ JackDriver::jack_xrun_cb(void* const jack_driver) auto* const me = static_cast(jack_driver); ++me->_xruns; - me->_xrun_delay = jack_get_xrun_delayed_usecs(me->_client); - - jack_reset_max_delayed_usecs(me->_client); return 0; } @@ -388,36 +385,7 @@ JackDriver::buffer_size() void JackDriver::reset_xruns() { - _xruns = 0; - _xrun_delay = 0; -} - -float -JackDriver::get_max_dsp_load() -{ - if (!_client) { - return 0.0f; - } - - const float max_delay = jack_get_max_delayed_usecs(_client); - const float rate = sample_rate(); - const float size = buffer_size(); - const float period = size / rate * 1000000; // usec - - if (max_delay > period) { - jack_reset_max_delayed_usecs(_client); - return 1.0f; - } - - return max_delay / period; -} - -void -JackDriver::reset_max_dsp_load() -{ - if (_client) { - jack_reset_max_delayed_usecs(_client); - } + _xruns = 0; } bool -- cgit v1.2.1