mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Re-add fixed-color DSP-load indicator background
This commit is contained in:
parent
7b4ab907d4
commit
54db84ffee
1 changed files with 6 additions and 4 deletions
|
|
@ -1679,16 +1679,18 @@ ARDOUR_UI::update_cpu_load ()
|
|||
const unsigned int x = _session ? _session->get_xrun_count () : 0;
|
||||
double const c = AudioEngine::instance()->get_dsp_load ();
|
||||
|
||||
const char* const bg = c > 90 ? " background=\"red\"" : "";
|
||||
|
||||
char buf[64];
|
||||
if (x > 9999) {
|
||||
snprintf (buf, sizeof (buf), "DSP: %.0f%% (>10k)", c);
|
||||
snprintf (buf, sizeof (buf), "DSP: <span%s>%.0f%%</span> (>10k)", bg, c);
|
||||
} else if (x > 0) {
|
||||
snprintf (buf, sizeof (buf), "DSP: %.0f%% (%d)", c, x);
|
||||
snprintf (buf, sizeof (buf), "DSP: <span%s>%.0f%%</span> (%d)", bg, c, x);
|
||||
} else {
|
||||
snprintf (buf, sizeof (buf), "DSP: %.0f%%", c);
|
||||
snprintf (buf, sizeof (buf), "DSP: <span%s>%.0f%%</span>", bg, c);
|
||||
}
|
||||
|
||||
dsp_load_label.set_text (buf);
|
||||
dsp_load_label.set_markup (buf);
|
||||
|
||||
if (x > 9999) {
|
||||
snprintf (buf, sizeof (buf), _("DSP: %.1f%% X: >10k\n%s"), c, _("Shift+Click to clear xruns."));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue