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/JackDbusDriver.cpp | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'src/JackDbusDriver.cpp') diff --git a/src/JackDbusDriver.cpp b/src/JackDbusDriver.cpp index d3caee3..4ab7b8c 100644 --- a/src/JackDbusDriver.cpp +++ b/src/JackDbusDriver.cpp @@ -59,7 +59,6 @@ JackDriver::JackDriver(ILog& log, EventSink emit_event) , _log(log) , _dbus_error() , _dbus_connection(nullptr) - , _max_dsp_load(0.0f) , _server_responding(false) , _server_started(false) , _graph_version(0) @@ -859,52 +858,6 @@ JackDriver::reset_xruns() dbus_message_unref(reply_ptr); } -float -JackDriver::get_max_dsp_load() -{ - DBusMessage* reply_ptr = nullptr; - double load = 0.0; - - if (_server_responding && !_server_started) { - return 0.0; - } - - if (!call(true, - JACKDBUS_IFACE_CONTROL, - "GetLoad", - &reply_ptr, - DBUS_TYPE_INVALID)) { - return 0.0; - } - - if (!dbus_message_get_args(reply_ptr, - &_dbus_error, - DBUS_TYPE_DOUBLE, - &load, - DBUS_TYPE_INVALID)) { - dbus_message_unref(reply_ptr); - dbus_error_free(&_dbus_error); - error_msg("Decoding reply of GetLoad failed"); - return 0.0; - } - - dbus_message_unref(reply_ptr); - - load /= 100.0; // convert from percent to [0..1] - - if (load > static_cast(_max_dsp_load)) { - _max_dsp_load = static_cast(load); - } - - return _max_dsp_load; -} - -void -JackDriver::reset_max_dsp_load() -{ - _max_dsp_load = 0.0; -} - PortType JackDriver::patchage_port_type(const dbus_uint32_t dbus_port_type) const { -- cgit v1.2.1