summaryrefslogtreecommitdiffstats
path: root/src/JackDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-29 16:55:25 +0100
committerDavid Robillard <d@drobilla.net>2020-11-29 18:03:31 +0100
commitd3561e8cf1d5a289ff2ce4a26e4a970437a812d5 (patch)
tree2383de628f8f1afe820fdd81dd5780f585f93717 /src/JackDriver.cpp
parent86ce5ca10998fbeb3e9841cb2307caf00373b946 (diff)
downloadpatchage-d3561e8cf1d5a289ff2ce4a26e4a970437a812d5.tar.gz
patchage-d3561e8cf1d5a289ff2ce4a26e4a970437a812d5.tar.bz2
patchage-d3561e8cf1d5a289ff2ce4a26e4a970437a812d5.zip
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.
Diffstat (limited to 'src/JackDriver.cpp')
-rw-r--r--src/JackDriver.cpp34
1 files changed, 1 insertions, 33 deletions
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<JackDriver*>(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