mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
Add RTA to Track List
This commit is contained in:
parent
72a4ff130a
commit
a196069a24
3 changed files with 39 additions and 2 deletions
|
|
@ -37,4 +37,6 @@ EditorRoutes::init ()
|
|||
append_col_rec_safe ();
|
||||
append_col_mute ();
|
||||
append_col_solo ();
|
||||
|
||||
setup_col (append_toggle (_columns.rta_enabled, _columns.active, sigc::mem_fun (*this, &EditorRoutes::on_tv_rta_enable_toggled)), S_("RTA|RA"), _("Realtime Analyzer active?"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
#include "keyboard.h"
|
||||
#include "public_editor.h"
|
||||
#include "route_sorter.h"
|
||||
#include "rta_manager.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
|
|
@ -83,6 +84,7 @@ RouteListBase::RouteListBase ()
|
|||
setup_col (append_toggle (_columns.visible, _columns.noop_true, sigc::mem_fun (*this, &RouteListBase::on_tv_visible_changed)), S_("Visible|V"), _("Track/Bus visible ?"));
|
||||
setup_col (append_toggle (_columns.trigger, _columns.is_track, sigc::mem_fun (*this, &RouteListBase::on_tv_trigger_changed)), S_("Cues|C"), _("Visible on Cues window ?"));
|
||||
setup_col (append_toggle (_columns.active, _columns.activatable, sigc::mem_fun (*this, &RouteListBase::on_tv_active_changed)), S_("Active|A"), _("Track/Bus active ?"));
|
||||
setup_col (append_toggle (_columns.rta_enabled, _columns.active, sigc::mem_fun (*this, &EditorRoutes::on_tv_rta_enable_toggled)), S_("RTA|RA"), _("Realtime Analyzer active?"));
|
||||
|
||||
append_col_input_active ();
|
||||
append_col_rec_enable ();
|
||||
|
|
@ -373,6 +375,24 @@ RouteListBase::on_tv_solo_safe_toggled (std::string const& path_string)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
RouteListBase::on_tv_rta_enable_toggled (std::string const& path_string)
|
||||
{
|
||||
Gtk::TreeModel::Row row = *_model->get_iter (Gtk::TreeModel::Path (path_string));
|
||||
std::shared_ptr<Stripable> stripable = row[_columns.stripable];
|
||||
std::shared_ptr<Route> route = std::dynamic_pointer_cast<Route> (stripable);
|
||||
|
||||
if (route) {
|
||||
bool attached = RTAManager::instance ()->attached (route);
|
||||
if (attached) {
|
||||
RTAManager::instance ()->remove (route);
|
||||
} else {
|
||||
RTAManager::instance ()->attach (route);
|
||||
ARDOUR_UI::instance()->show_realtime_analyzer ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RouteListBase::build_menu ()
|
||||
{
|
||||
|
|
@ -653,6 +673,7 @@ RouteListBase::add_stripables (StripableList& slist)
|
|||
|
||||
if (route) {
|
||||
route->active_changed.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::queue_idle_update, this), gui_context ());
|
||||
route->gui_changed.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::handle_gui_changes, this, _1), gui_context());
|
||||
}
|
||||
stripable->DropReferences.connect (_stripable_connections, invalidator (_scroller), std::bind (&RouteListBase::remove_strip, this, ws), gui_context ());
|
||||
}
|
||||
|
|
@ -1151,9 +1172,11 @@ RouteListBase::idle_update_mute_rec_solo_etc ()
|
|||
(*i)[_columns.solo_isolate_state] = RouteUI::solo_isolate_active_state (stripable) ? 1 : 0;
|
||||
(*i)[_columns.solo_safe_state] = RouteUI::solo_safe_active_state (stripable) ? 1 : 0;
|
||||
if (route) {
|
||||
(*i)[_columns.active] = route->active ();
|
||||
(*i)[_columns.active] = route->active ();
|
||||
(*i)[_columns.rta_enabled] = RTAManager::instance ()->attached (route);
|
||||
} else {
|
||||
(*i)[_columns.active] = true;
|
||||
(*i)[_columns.active] = true;
|
||||
(*i)[_columns.rta_enabled] = false;
|
||||
}
|
||||
|
||||
std::shared_ptr<Track> trk (std::dynamic_pointer_cast<Track> (route));
|
||||
|
|
@ -1181,6 +1204,14 @@ RouteListBase::idle_update_mute_rec_solo_etc ()
|
|||
return false; // do not call again (until needed)
|
||||
}
|
||||
|
||||
void
|
||||
RouteListBase::handle_gui_changes (std::string const& what)
|
||||
{
|
||||
if (what == "rta") {
|
||||
queue_idle_update ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RouteListBase::clear ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ protected:
|
|||
void on_tv_solo_enable_toggled (std::string const&);
|
||||
void on_tv_solo_isolate_toggled (std::string const&);
|
||||
void on_tv_solo_safe_toggled (std::string const&);
|
||||
void on_tv_rta_enable_toggled (std::string const&);
|
||||
void on_tv_visible_changed (std::string const&);
|
||||
void on_tv_trigger_changed (std::string const&);
|
||||
void on_tv_active_changed (std::string const&);
|
||||
|
|
@ -135,6 +136,7 @@ protected:
|
|||
add (solo_lock_iso_visible);
|
||||
add (solo_isolate_state);
|
||||
add (solo_safe_state);
|
||||
add (rta_enabled);
|
||||
add (is_track);
|
||||
add (stripable);
|
||||
add (name_editable);
|
||||
|
|
@ -156,6 +158,7 @@ protected:
|
|||
Gtk::TreeModelColumn<bool> solo_lock_iso_visible;
|
||||
Gtk::TreeModelColumn<uint32_t> solo_isolate_state;
|
||||
Gtk::TreeModelColumn<uint32_t> solo_safe_state;
|
||||
Gtk::TreeModelColumn<bool> rta_enabled;
|
||||
Gtk::TreeModelColumn<bool> is_track;
|
||||
Gtk::TreeModelColumn<std::shared_ptr<ARDOUR::Stripable>> stripable;
|
||||
Gtk::TreeModelColumn<bool> name_editable;
|
||||
|
|
@ -194,6 +197,7 @@ private:
|
|||
void queue_idle_update ();
|
||||
bool idle_update_mute_rec_solo_etc ();
|
||||
void update_input_active_display ();
|
||||
void handle_gui_changes (std::string const&);
|
||||
|
||||
void route_property_changed (const PBD::PropertyChange&, std::weak_ptr<ARDOUR::Stripable>);
|
||||
void presentation_info_changed (PBD::PropertyChange const&);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue