2021-06-11 20:55:16 -04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 Robin Gareus <robin@gareus.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
2024-09-30 13:21:36 -04:00
|
|
|
#include <gtkmm/alignment.h>
|
2021-06-15 16:03:48 -04:00
|
|
|
#include <gtkmm/frame.h>
|
|
|
|
|
2021-06-11 20:55:16 -04:00
|
|
|
#include "gtkmm2ext/utils.h"
|
|
|
|
|
|
|
|
#include "ardour/session.h"
|
|
|
|
#include "ardour/audioengine.h"
|
|
|
|
#include "ardour/audio_backend.h"
|
|
|
|
|
2021-06-15 16:03:48 -04:00
|
|
|
#include "widgets/tooltips.h"
|
|
|
|
|
2021-06-28 20:28:06 -04:00
|
|
|
#include "ardour_ui.h"
|
2021-06-11 20:55:16 -04:00
|
|
|
#include "dsp_stats_ui.h"
|
|
|
|
#include "timers.h"
|
2021-06-28 20:28:06 -04:00
|
|
|
#include "utils.h"
|
2021-06-11 20:55:16 -04:00
|
|
|
|
|
|
|
#include "pbd/i18n.h"
|
|
|
|
|
|
|
|
using namespace ARDOUR;
|
|
|
|
using namespace Gtkmm2ext;
|
|
|
|
using namespace Gtk;
|
|
|
|
|
2021-06-12 11:20:58 -04:00
|
|
|
DspStatisticsGUI::DspStatisticsGUI ()
|
2022-01-26 16:20:26 -05:00
|
|
|
: buffer_size_label ("", ALIGN_END, ALIGN_CENTER)
|
2021-06-13 12:28:36 -04:00
|
|
|
, reset_button (_("Reset"))
|
2021-06-11 20:55:16 -04:00
|
|
|
{
|
|
|
|
const size_t nlabels = Session::NTT + AudioEngine::NTT + AudioBackend::NTT;
|
2021-06-13 13:21:59 -04:00
|
|
|
char buf[64];
|
2021-06-11 20:55:16 -04:00
|
|
|
|
|
|
|
labels = new Label*[nlabels];
|
2021-06-13 13:21:59 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%7.2f msec %6.2f%%", 10000.0, 100.0);
|
|
|
|
|
2021-06-11 20:55:16 -04:00
|
|
|
for (size_t n = 0; n < nlabels; ++n) {
|
2022-01-26 16:20:26 -05:00
|
|
|
labels[n] = new Label ("", ALIGN_END, ALIGN_CENTER);
|
2021-06-13 13:21:59 -04:00
|
|
|
set_size_request_to_display_given_text (*labels[n], buf, 0, 0);
|
2021-06-11 20:55:16 -04:00
|
|
|
}
|
|
|
|
|
2021-06-12 11:20:58 -04:00
|
|
|
int row = 0;
|
|
|
|
|
2022-01-26 16:20:26 -05:00
|
|
|
table.attach (*manage (new Gtk::Label (_("Buffer size: "), ALIGN_END, ALIGN_CENTER)), 0, 1, row, row+1, Gtk::FILL, Gtk::SHRINK, 2, 0);
|
2021-06-15 16:03:48 -04:00
|
|
|
table.attach (buffer_size_label, 2, 3, row, row+1, Gtk::FILL, Gtk::SHRINK, 2, 0);
|
2021-06-12 11:20:58 -04:00
|
|
|
row++;
|
|
|
|
|
2022-01-26 16:20:26 -05:00
|
|
|
table.attach (*manage (new Gtk::Label (_("Idle: "), ALIGN_END, ALIGN_CENTER)), 0, 1, row, row+1, Gtk::FILL, Gtk::SHRINK, 2, 0);
|
2021-06-15 16:03:48 -04:00
|
|
|
table.attach (*labels[AudioEngine::NTT + Session::NTT + AudioBackend::DeviceWait], 2, 3, row, row+1, Gtk::FILL, Gtk::SHRINK, 2, 0);
|
2021-06-12 11:20:58 -04:00
|
|
|
row++;
|
|
|
|
|
2022-01-26 16:20:26 -05:00
|
|
|
table.attach (*manage (new Gtk::Label (_("DSP: "), ALIGN_END, ALIGN_CENTER)), 0, 1, row, row+1, Gtk::FILL, Gtk::SHRINK, 2, 0);
|
2021-06-15 16:03:48 -04:00
|
|
|
table.attach (*labels[AudioEngine::NTT + Session::NTT + AudioBackend::RunLoop], 2, 3, row, row+1, Gtk::FILL, Gtk::SHRINK, 2, 0);
|
2021-06-12 11:20:58 -04:00
|
|
|
row++;
|
|
|
|
|
2022-01-26 16:20:26 -05:00
|
|
|
Label* right_angle_text1 = manage (new Label ("\xe2\x94\x94", ALIGN_END, ALIGN_CENTER));
|
2021-06-16 21:28:57 -04:00
|
|
|
|
2022-01-26 16:20:26 -05:00
|
|
|
table.attach (*manage (new Gtk::Label (_("Engine: "), ALIGN_END, ALIGN_CENTER)), 1, 2, row, row+1, Gtk::FILL, Gtk::SHRINK, 2, 0);
|
2021-06-16 21:28:57 -04:00
|
|
|
table.attach (*right_angle_text1, 0, 1, row, row+1, Gtk::FILL, Gtk::SHRINK, 2, 0);
|
2021-06-15 16:03:48 -04:00
|
|
|
table.attach (*labels[AudioEngine::ProcessCallback], 2, 3, row, row+1, Gtk::FILL, Gtk::SHRINK, 2, 0);
|
2021-06-12 11:20:58 -04:00
|
|
|
row++;
|
|
|
|
|
2022-01-26 16:20:26 -05:00
|
|
|
Label* right_angle_text2 = manage (new Label ("\xe2\x94\x94", ALIGN_END, ALIGN_CENTER));
|
2021-06-16 21:28:57 -04:00
|
|
|
|
2022-01-26 16:20:26 -05:00
|
|
|
table.attach (*manage (new Gtk::Label (_("Session: "), ALIGN_END, ALIGN_CENTER)), 1, 2, row, row+1, Gtk::FILL, Gtk::SHRINK, 2, 0);
|
2021-06-16 21:28:57 -04:00
|
|
|
table.attach (*right_angle_text2, 0, 1, row, row+1, Gtk::FILL, Gtk::SHRINK, 2, 0);
|
2021-06-15 16:03:48 -04:00
|
|
|
table.attach (*labels[AudioEngine::NTT + Session::OverallProcess], 2, 3, row, row+1, Gtk::FILL, Gtk::SHRINK, 2, 0);
|
2021-06-12 11:20:58 -04:00
|
|
|
row++;
|
|
|
|
|
2021-06-15 16:03:48 -04:00
|
|
|
HBox* hbox2 = manage (new HBox);
|
|
|
|
hbox2->pack_start (reset_button, true, true);
|
|
|
|
|
|
|
|
set_border_width (12);
|
|
|
|
set_spacing (6);
|
|
|
|
|
|
|
|
info_text.set_markup (_("The measurements shown below are <b>worst case</b>.\n"
|
|
|
|
"\n"
|
|
|
|
"This is more important in determining system load\n"
|
2022-12-26 08:53:05 -05:00
|
|
|
"than an average. To see average values, mouse-over\n"
|
|
|
|
"any line:"));
|
|
|
|
Gtk::Alignment *i_align = Gtk::manage (new Gtk::Alignment());
|
|
|
|
i_align->set_padding (6, 6, 6, 6);
|
|
|
|
i_align->add (info_text);
|
2021-06-15 16:03:48 -04:00
|
|
|
|
|
|
|
Gtk::Frame* frame = manage (new Gtk::Frame);
|
|
|
|
frame->set_shadow_type (Gtk::SHADOW_IN);
|
2022-12-26 08:53:05 -05:00
|
|
|
frame->add (*i_align);
|
2021-06-15 16:03:48 -04:00
|
|
|
|
|
|
|
pack_start (*frame, false, false);
|
|
|
|
pack_start (table, true, true, 20);
|
|
|
|
pack_start (*hbox2, false, false);
|
2021-06-13 12:28:36 -04:00
|
|
|
|
|
|
|
reset_button.signal_clicked().connect (sigc::mem_fun (*this, &DspStatisticsGUI::reset_button_clicked));
|
2021-06-12 16:49:30 -04:00
|
|
|
|
2021-06-12 11:20:58 -04:00
|
|
|
show_all ();
|
2021-06-11 20:55:16 -04:00
|
|
|
}
|
|
|
|
|
2021-06-13 12:28:36 -04:00
|
|
|
void
|
|
|
|
DspStatisticsGUI::reset_button_clicked ()
|
|
|
|
{
|
2021-06-13 14:21:21 -04:00
|
|
|
ARDOUR::reset_performance_meters (_session);
|
2021-06-13 12:28:36 -04:00
|
|
|
}
|
|
|
|
|
2021-06-11 20:55:16 -04:00
|
|
|
void
|
|
|
|
DspStatisticsGUI::start_updating ()
|
|
|
|
{
|
|
|
|
update ();
|
|
|
|
update_connection = Timers::second_connect (sigc::mem_fun(*this, &DspStatisticsGUI::update));
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
DspStatisticsGUI::stop_updating ()
|
|
|
|
{
|
|
|
|
update_connection.disconnect ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
DspStatisticsGUI::update ()
|
|
|
|
{
|
2021-06-28 16:47:39 -04:00
|
|
|
PBD::microseconds_t min = 0;
|
|
|
|
PBD::microseconds_t max = 0;
|
2021-06-12 16:49:30 -04:00
|
|
|
double avg = 0.;
|
|
|
|
double dev = 0.;
|
2021-06-12 11:20:58 -04:00
|
|
|
char buf[64];
|
2021-06-13 20:35:27 -04:00
|
|
|
char const * const not_measured_string = X_("--");
|
2021-06-15 16:03:48 -04:00
|
|
|
double devf;
|
|
|
|
double avgf;
|
2021-06-12 11:20:58 -04:00
|
|
|
|
2021-06-27 15:32:46 -04:00
|
|
|
/* translatable math and unit terms */
|
|
|
|
const char * const str_msec = _("msec");
|
|
|
|
const char * const str_usec = _("usec");
|
|
|
|
const char * const str_average = _("average");
|
|
|
|
const char * const str_std_dev = _("std dev");
|
|
|
|
|
2021-06-12 16:49:30 -04:00
|
|
|
int bufsize = AudioEngine::instance()->samples_per_cycle ();
|
|
|
|
double bufsize_usecs = (bufsize * 1000000.0) / AudioEngine::instance()->sample_rate();
|
2021-06-12 11:20:58 -04:00
|
|
|
double bufsize_msecs = (bufsize * 1000.0) / AudioEngine::instance()->sample_rate();
|
|
|
|
snprintf (buf, sizeof (buf), "%d samples / %5.2f msecs", bufsize, bufsize_msecs);
|
|
|
|
buffer_size_label.set_text (buf);
|
|
|
|
|
2021-06-12 16:49:30 -04:00
|
|
|
if (AudioEngine::instance()->current_backend()->dsp_stats[AudioBackend::DeviceWait].get_stats (min, max, avg, dev)) {
|
|
|
|
|
2021-06-15 16:03:48 -04:00
|
|
|
/* We show the min time here, since that's the worst case
|
|
|
|
* (other timers are max == worst case)
|
|
|
|
*/
|
|
|
|
|
2021-06-28 20:23:06 -04:00
|
|
|
if (min > 1000) {
|
2021-06-13 13:05:19 -04:00
|
|
|
double minf = min / 1000.0;
|
2021-06-15 16:03:48 -04:00
|
|
|
devf = dev / 1000.0;
|
|
|
|
avgf = avg / 1000.0;
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%7.2f %s %5.2f%%", minf, str_msec, (100.0 * minf) / bufsize_msecs);
|
2021-06-12 16:49:30 -04:00
|
|
|
} else {
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%" PRId64 " %s %5.2f%%", min, str_usec, (100.0 * min) / bufsize_usecs);
|
2021-06-12 16:49:30 -04:00
|
|
|
}
|
|
|
|
labels[AudioEngine::NTT + Session::NTT + AudioBackend::DeviceWait]->set_text (buf);
|
2021-06-15 16:03:48 -04:00
|
|
|
|
2021-06-28 20:23:06 -04:00
|
|
|
if (min > 1000) {
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%s: %7.2f %s %5.2f%% (%s. %5.2f)", str_average, avgf, str_msec, (100.0 * avgf) / bufsize_msecs, str_std_dev, devf);
|
2021-06-15 16:03:48 -04:00
|
|
|
} else {
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%s: %7.2f %s %5.2f%% (%s. %5.2f)", str_average, avg, str_usec, (100.0 * avg) / bufsize_usecs, str_std_dev, dev);
|
2021-06-15 16:03:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
ArdourWidgets::set_tooltip (labels[AudioEngine::NTT + Session::NTT + AudioBackend::DeviceWait], buf);
|
|
|
|
|
2021-06-12 16:49:30 -04:00
|
|
|
} else {
|
2021-06-13 20:35:27 -04:00
|
|
|
labels[AudioEngine::NTT + Session::NTT + AudioBackend::DeviceWait]->set_text (not_measured_string);
|
2021-06-15 16:03:48 -04:00
|
|
|
ArdourWidgets::set_tooltip (labels[AudioEngine::NTT + Session::NTT + AudioBackend::DeviceWait], "");
|
2021-06-12 16:49:30 -04:00
|
|
|
}
|
|
|
|
|
2021-06-13 12:28:36 -04:00
|
|
|
if (AudioEngine::instance()->current_backend()->dsp_stats[AudioBackend::RunLoop].get_stats (min, max, avg, dev)) {
|
2021-06-11 20:55:16 -04:00
|
|
|
|
2021-06-28 20:23:06 -04:00
|
|
|
if (max > 1000) {
|
2021-06-13 12:28:36 -04:00
|
|
|
double maxf = max / 1000.0;
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%7.2f %s %5.2f%%", maxf, str_msec, (100.0 * maxf) / bufsize_msecs);
|
2021-06-13 12:28:36 -04:00
|
|
|
} else {
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%" PRId64 " %s %5.2f%%", max, str_usec, (100.0 * max) / bufsize_usecs);
|
2021-06-13 12:28:36 -04:00
|
|
|
}
|
|
|
|
labels[AudioEngine::NTT + Session::NTT + AudioBackend::RunLoop]->set_text (buf);
|
2021-06-15 16:03:48 -04:00
|
|
|
|
|
|
|
|
2021-06-28 20:23:06 -04:00
|
|
|
if (min > 1000) {
|
2021-06-15 16:03:48 -04:00
|
|
|
devf = dev / 1000.0;
|
|
|
|
avgf = avg / 1000.0;
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%s: %7.2f %s %5.2f%% (%s. %5.2f)", str_average, avgf, str_msec, (100.0 * avgf) / bufsize_msecs, str_std_dev, devf);
|
2021-06-15 16:03:48 -04:00
|
|
|
} else {
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%s: %7.2f %s %5.2f%% (%s. %5.2f)", str_average, avg, str_usec, (100.0 * avg) / bufsize_usecs, str_std_dev, dev);
|
2021-06-15 16:03:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
ArdourWidgets::set_tooltip (labels[AudioEngine::NTT + Session::NTT + AudioBackend::RunLoop], buf);
|
|
|
|
|
2021-06-12 16:49:30 -04:00
|
|
|
} else {
|
2021-06-13 20:35:27 -04:00
|
|
|
labels[AudioEngine::NTT + Session::NTT + AudioBackend::RunLoop]->set_text (not_measured_string);
|
2021-06-15 16:03:48 -04:00
|
|
|
ArdourWidgets::set_tooltip (labels[AudioEngine::NTT + Session::NTT + AudioBackend::RunLoop], "");
|
2021-06-12 16:49:30 -04:00
|
|
|
}
|
2021-06-12 11:20:58 -04:00
|
|
|
|
2021-06-12 16:49:30 -04:00
|
|
|
AudioEngine::instance()->dsp_stats[AudioEngine::ProcessCallback].get_stats (min, max, avg, dev);
|
2021-06-12 11:20:58 -04:00
|
|
|
|
2021-06-12 16:49:30 -04:00
|
|
|
if (_session) {
|
2021-06-12 11:20:58 -04:00
|
|
|
|
2021-06-28 16:47:39 -04:00
|
|
|
PBD::microseconds_t smin = 0;
|
|
|
|
PBD::microseconds_t smax = 0;
|
2021-06-12 16:49:30 -04:00
|
|
|
double savg = 0.;
|
|
|
|
double sdev = 0.;
|
2021-06-12 11:20:58 -04:00
|
|
|
|
2021-06-12 16:49:30 -04:00
|
|
|
_session->dsp_stats[AudioEngine::ProcessCallback].get_stats (smin, smax, savg, sdev);
|
2021-06-12 11:20:58 -04:00
|
|
|
|
2021-06-28 20:23:06 -04:00
|
|
|
if (smax > 1000) {
|
2021-06-13 13:05:19 -04:00
|
|
|
double maxf = smax / 1000.0;
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%7.2f %s %5.2f%%", maxf, str_msec, (100.0 * maxf) / bufsize_msecs);
|
2021-06-13 13:05:19 -04:00
|
|
|
} else {
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%" PRId64 " %s %5.2f%%", max, str_usec, (100.0 * max) / bufsize_usecs);
|
2021-06-13 13:05:19 -04:00
|
|
|
}
|
2021-06-12 16:49:30 -04:00
|
|
|
labels[AudioEngine::NTT + Session::OverallProcess]->set_text (buf);
|
2021-06-12 11:20:58 -04:00
|
|
|
|
2021-06-28 20:23:06 -04:00
|
|
|
if (max > 1000) {
|
2021-06-15 16:03:48 -04:00
|
|
|
devf = dev / 1000.0;
|
|
|
|
avgf = avg / 1000.0;
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%s: %7.2f %s %5.2f%% (%s. %5.2f)", str_average, avgf, str_msec, (100.0 * avgf) / bufsize_msecs, str_std_dev, devf);
|
2021-06-15 16:03:48 -04:00
|
|
|
} else {
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%s: %7.2f %s %5.2f%% (%s. %5.2f)", str_average, avg, str_usec, (100.0 * avg) / bufsize_usecs, str_std_dev, dev);
|
2021-06-15 16:03:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
ArdourWidgets::set_tooltip (labels[AudioEngine::NTT + Session::OverallProcess], buf);
|
|
|
|
|
2021-06-12 16:49:30 -04:00
|
|
|
/* Subtract session time from engine process time to show
|
|
|
|
* engine overhead
|
|
|
|
*/
|
2021-06-12 11:20:58 -04:00
|
|
|
|
2021-06-12 16:49:30 -04:00
|
|
|
min -= smin;
|
|
|
|
max -= smax;
|
|
|
|
avg -= savg;
|
|
|
|
dev -= sdev;
|
2021-06-12 11:20:58 -04:00
|
|
|
|
2021-06-28 20:23:06 -04:00
|
|
|
if (max > 1000) {
|
2021-06-13 13:05:19 -04:00
|
|
|
double maxf = max / 1000.0;
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%7.2f %s %5.2f%%", maxf, str_msec, (100.0 * maxf) / bufsize_msecs);
|
2021-06-13 13:05:19 -04:00
|
|
|
} else {
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%" PRId64 " %s %5.2f%%", max, str_usec, (100.0 * max) / bufsize_usecs);
|
2021-06-13 13:05:19 -04:00
|
|
|
}
|
2021-06-12 16:49:30 -04:00
|
|
|
labels[AudioEngine::ProcessCallback]->set_text (buf);
|
2021-06-12 11:20:58 -04:00
|
|
|
|
2021-06-28 20:23:06 -04:00
|
|
|
if (max > 1000) {
|
2021-06-15 16:03:48 -04:00
|
|
|
devf = dev / 1000.0;
|
|
|
|
avgf = avg / 1000.0;
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%s: %7.2f %s %5.2f%% (%s. %5.2f)", str_average, avgf, str_msec, (100.0 * avgf) / bufsize_msecs, str_std_dev, devf);
|
2021-06-15 16:03:48 -04:00
|
|
|
} else {
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%s: %7.2f %s %5.2f%% (%s. %5.2f)", str_average, avg, str_usec, (100.0 * avg) / bufsize_usecs, str_std_dev, dev);
|
2021-06-15 16:03:48 -04:00
|
|
|
}
|
2021-06-16 21:28:57 -04:00
|
|
|
|
2021-06-15 16:03:48 -04:00
|
|
|
ArdourWidgets::set_tooltip (labels[AudioEngine::ProcessCallback], buf);
|
|
|
|
|
2021-06-12 16:49:30 -04:00
|
|
|
} else {
|
|
|
|
|
2021-06-28 20:23:06 -04:00
|
|
|
if (max > 1000) {
|
2021-06-13 13:05:19 -04:00
|
|
|
double maxf = max / 1000.0;
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%7.2f %s %5.2f%%", maxf, str_msec, (100.0 * maxf) / bufsize_msecs);
|
2021-06-13 13:05:19 -04:00
|
|
|
} else {
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%" PRId64 " %s %5.2f%%", max, str_usec, (100.0 * max) / bufsize_usecs);
|
2021-06-13 13:05:19 -04:00
|
|
|
}
|
2021-06-12 16:49:30 -04:00
|
|
|
labels[AudioEngine::ProcessCallback]->set_text (buf);
|
2021-06-15 16:03:48 -04:00
|
|
|
|
2021-06-28 20:23:06 -04:00
|
|
|
if (max > 1000) {
|
2021-06-15 16:03:48 -04:00
|
|
|
devf = dev / 1000.0;
|
|
|
|
avgf = avg / 1000.0;
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%s: %7.2f %s %5.2f%% (%s. %5.2f)", str_average, avgf, str_msec, (100.0 * avgf) / bufsize_msecs, str_std_dev, devf);
|
2021-06-15 16:03:48 -04:00
|
|
|
} else {
|
2021-06-27 15:32:46 -04:00
|
|
|
snprintf (buf, sizeof (buf), "%s: %7.2f %s %5.2f%% (%s. %5.2f)", str_average, avg, str_usec, (100.0 * avg) / bufsize_usecs, str_std_dev, dev);
|
2021-06-15 16:03:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
ArdourWidgets::set_tooltip (labels[AudioEngine::ProcessCallback], buf);
|
|
|
|
|
|
|
|
|
2021-06-12 16:49:30 -04:00
|
|
|
labels[AudioEngine::NTT + Session::OverallProcess]->set_text (_("No session loaded"));
|
2021-06-15 16:03:48 -04:00
|
|
|
ArdourWidgets::set_tooltip (labels[AudioEngine::NTT + Session::OverallProcess], "");
|
2021-06-12 11:20:58 -04:00
|
|
|
}
|
|
|
|
}
|
2021-06-28 20:28:06 -04:00
|
|
|
|
|
|
|
bool
|
|
|
|
DspStatisticsGUI::on_key_press_event (GdkEventKey* ev)
|
|
|
|
{
|
|
|
|
Gtk::Window& main_window (ARDOUR_UI::instance()->main_window());
|
|
|
|
return ARDOUR_UI_UTILS::relay_key_press (ev, &main_window);
|
|
|
|
}
|