display active peak-builds
This commit is contained in:
@@ -86,6 +86,7 @@
|
||||
#include "ardour/session_route.h"
|
||||
#include "ardour/session_state_utils.h"
|
||||
#include "ardour/session_utils.h"
|
||||
#include "ardour/source_factory.h"
|
||||
#include "ardour/slave.h"
|
||||
#include "ardour/system_exec.h"
|
||||
|
||||
@@ -489,6 +490,7 @@ ARDOUR_UI::engine_running ()
|
||||
update_xrun_count ();
|
||||
update_sample_rate (AudioEngine::instance()->sample_rate());
|
||||
update_timecode_format ();
|
||||
update_peak_thread_work ();
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1261,6 +1263,7 @@ ARDOUR_UI::every_second ()
|
||||
update_buffer_load ();
|
||||
update_disk_space ();
|
||||
update_timecode_format ();
|
||||
update_peak_thread_work ();
|
||||
|
||||
if (nsm && nsm->is_active ()) {
|
||||
nsm->check ();
|
||||
@@ -1461,6 +1464,19 @@ ARDOUR_UI::update_cpu_load ()
|
||||
cpu_load_label.set_markup (buf);
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::update_peak_thread_work ()
|
||||
{
|
||||
char buf[64];
|
||||
const int c = SourceFactory::peak_work_queue_length ();
|
||||
if (c > 0) {
|
||||
snprintf (buf, sizeof (buf), _("PkBld: <span foreground=\"%s\">%d</span>"), c >= 2 ? X_("red") : X_("green"), c);
|
||||
peak_thread_work_label.set_markup (buf);
|
||||
} else {
|
||||
peak_thread_work_label.set_markup (X_(""));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::update_buffer_load ()
|
||||
{
|
||||
|
||||
@@ -553,6 +553,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||
Gtk::Label xrun_label;
|
||||
void update_xrun_count ();
|
||||
|
||||
Gtk::Label peak_thread_work_label;
|
||||
void update_peak_thread_work ();
|
||||
|
||||
Gtk::Label buffer_load_label;
|
||||
void update_buffer_load ();
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ ARDOUR_UI::install_actions ()
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_action (main_actions, X_("CleanupPeakFiles"), _("Clean-up Peak Files..."), sigc::mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::cleanup_peakfiles));
|
||||
act = ActionManager::register_action (main_actions, X_("CleanupPeakFiles"), _("Reset Peak Files"), sigc::mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::cleanup_peakfiles));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
@@ -502,6 +502,8 @@ ARDOUR_UI::build_menu_bar ()
|
||||
cpu_load_label.set_use_markup ();
|
||||
xrun_label.set_name ("XrunLabel");
|
||||
xrun_label.set_use_markup ();
|
||||
peak_thread_work_label.set_name ("PeakThreadWork");
|
||||
peak_thread_work_label.set_use_markup ();
|
||||
buffer_load_label.set_name ("BufferLoad");
|
||||
buffer_load_label.set_use_markup ();
|
||||
sample_rate_label.set_name ("SampleRate");
|
||||
@@ -531,6 +533,7 @@ ARDOUR_UI::build_menu_bar ()
|
||||
hbox->pack_end (wall_clock_label, false, false, 2);
|
||||
hbox->pack_end (disk_space_label, false, false, 4);
|
||||
hbox->pack_end (xrun_label, false, false, 4);
|
||||
hbox->pack_end (peak_thread_work_label, false, false, 4);
|
||||
hbox->pack_end (cpu_load_label, false, false, 4);
|
||||
hbox->pack_end (buffer_load_label, false, false, 4);
|
||||
hbox->pack_end (sample_rate_label, false, false, 4);
|
||||
@@ -548,6 +551,7 @@ ARDOUR_UI::build_menu_bar ()
|
||||
_status_bar_visibility.add (&disk_space_label, X_("Disk"), _("Disk Space"), disk_space);
|
||||
_status_bar_visibility.add (&cpu_load_label, X_("DSP"), _("DSP"), true);
|
||||
_status_bar_visibility.add (&xrun_label, X_("XRun"), _("X-run"), false);
|
||||
_status_bar_visibility.add (&peak_thread_work_label,X_("Peakfile"), _("Active Peak-file Work"), false);
|
||||
_status_bar_visibility.add (&buffer_load_label, X_("Buffers"), _("Buffers"), true);
|
||||
_status_bar_visibility.add (&sample_rate_label, X_("Audio"), _("Audio"), true);
|
||||
_status_bar_visibility.add (&timecode_format_label, X_("TCFormat"), _("Timecode Format"), true);
|
||||
|
||||
Reference in New Issue
Block a user