add [master] meter to the toolbar
http://tracker.ardour.org/view.php?id=5601
This commit is contained in:
@@ -181,6 +181,8 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
||||
, solo_alert_button (_("solo"))
|
||||
, feedback_alert_button (_("feedback"))
|
||||
|
||||
, editor_meter(0)
|
||||
|
||||
, speaker_config_window (X_("speaker-config"), _("Speaker Configuration"))
|
||||
, theme_manager (X_("theme-manager"), _("Theme Manager"))
|
||||
, key_editor (X_("key-editor"), _("Key Bindings"))
|
||||
@@ -1036,6 +1038,9 @@ ARDOUR_UI::every_point_zero_something_seconds ()
|
||||
// august 2007: actual update frequency: 25Hz (40ms), not 100Hz
|
||||
|
||||
SuperRapidScreenUpdate(); /* EMIT_SIGNAL */
|
||||
if (editor_meter) {
|
||||
editor_meter->update_meters();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -4117,3 +4122,29 @@ ARDOUR_UI::session_format_mismatch (std::string xml_path, std::string backup_pat
|
||||
|
||||
msg.run ();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ARDOUR_UI::reset_peak_display ()
|
||||
{
|
||||
if (!_session || !_session->master_out() || !editor_meter) return;
|
||||
editor_meter->clear_meters();
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::reset_group_peak_display (RouteGroup* group)
|
||||
{
|
||||
if (!_session || !_session->master_out()) return;
|
||||
if (group == _session->master_out()->route_group()) {
|
||||
reset_peak_display ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::reset_route_peak_display (Route* route)
|
||||
{
|
||||
if (!_session || !_session->master_out()) return;
|
||||
if (_session->master_out().get() == route) {
|
||||
reset_peak_display ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,6 +103,7 @@ class SpeakerDialog;
|
||||
class ThemeManager;
|
||||
class TimeInfoBox;
|
||||
class MidiTracer;
|
||||
class LevelMeter;
|
||||
class GlobalPortMatrixWindow;
|
||||
class GUIObjectState;
|
||||
|
||||
@@ -280,6 +281,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||
void get_process_buffers ();
|
||||
void drop_process_buffers ();
|
||||
|
||||
void reset_peak_display ();
|
||||
void reset_route_peak_display (ARDOUR::Route*);
|
||||
void reset_group_peak_display (ARDOUR::RouteGroup*);
|
||||
|
||||
const std::string& announce_string() const { return _announce_string; }
|
||||
|
||||
protected:
|
||||
@@ -443,6 +448,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||
ArdourButton feedback_alert_button;
|
||||
|
||||
Gtk::VBox alert_box;
|
||||
Gtk::VBox meter_box;
|
||||
LevelMeter * editor_meter;
|
||||
|
||||
void solo_blink (bool);
|
||||
void sync_blink (bool);
|
||||
|
||||
@@ -417,6 +417,7 @@ ARDOUR_UI::setup_transport ()
|
||||
transport_tearoff_hbox.pack_start (_editor_transport_box, false, false);
|
||||
}
|
||||
transport_tearoff_hbox.pack_start (alert_box, false, false);
|
||||
transport_tearoff_hbox.pack_start (meter_box, false, false);
|
||||
|
||||
if (Profile->get_sae()) {
|
||||
Image* img = manage (new Image ((::get_icon (X_("sae")))));
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "keyeditor.h"
|
||||
#include "location_ui.h"
|
||||
#include "main_clock.h"
|
||||
#include "meter_patterns.h"
|
||||
#include "midi_tracer.h"
|
||||
#include "mixer_ui.h"
|
||||
#include "public_editor.h"
|
||||
@@ -186,6 +187,26 @@ ARDOUR_UI::set_session (Session *s)
|
||||
point_zero_something_second_connection = Glib::signal_timeout().connect (sigc::mem_fun(*this, &ARDOUR_UI::every_point_zero_something_seconds), 40);
|
||||
|
||||
update_format ();
|
||||
|
||||
if (editor_meter) {
|
||||
meter_box.remove(*editor_meter);
|
||||
delete editor_meter;
|
||||
editor_meter = 0;
|
||||
}
|
||||
|
||||
if (_session && _session->master_out()) {
|
||||
editor_meter = new LevelMeter(_session);
|
||||
editor_meter->set_meter (_session->master_out()->shared_peak_meter().get());
|
||||
editor_meter->clear_meters();
|
||||
editor_meter->set_type (_session->master_out()->meter_type());
|
||||
editor_meter->setup_meters (30, 12, 6);
|
||||
meter_box.pack_start(*editor_meter);
|
||||
|
||||
ArdourMeter::ResetAllPeakDisplays.connect (sigc::mem_fun(*this, &ARDOUR_UI::reset_peak_display));
|
||||
ArdourMeter::ResetRoutePeakDisplays.connect (sigc::mem_fun(*this, &ARDOUR_UI::reset_route_peak_display));
|
||||
ArdourMeter::ResetGroupPeakDisplays.connect (sigc::mem_fun(*this, &ARDOUR_UI::reset_group_peak_display));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
@@ -225,6 +246,12 @@ ARDOUR_UI::unload_session (bool hide_stuff)
|
||||
point_one_second_connection.disconnect ();
|
||||
point_zero_something_second_connection.disconnect();
|
||||
|
||||
if (editor_meter) {
|
||||
meter_box.remove(*editor_meter);
|
||||
delete editor_meter;
|
||||
editor_meter = 0;
|
||||
}
|
||||
|
||||
ActionManager::set_sensitive (ActionManager::session_sensitive_actions, false);
|
||||
|
||||
rec_button.set_sensitive (false);
|
||||
|
||||
Reference in New Issue
Block a user