better GUI handling of virtual soundcheck

This commit is contained in:
Paul Davis 2024-04-04 17:01:42 -06:00
parent 4a2bed08ec
commit 38a87bc4c6
4 changed files with 24 additions and 2 deletions

View File

@ -497,6 +497,7 @@ private:
void update_autosave();
sigc::connection _autosave_connection;
void virtual_soundcheck_changed (bool);
void session_dirty_changed ();
void update_title ();

View File

@ -731,3 +731,19 @@ ARDOUR_UI::livetrax_set_file_format (LiveTraxFileFormat const & ff)
_session->reset_native_file_format ();
}
void
ARDOUR_UI::virtual_soundcheck_changed (bool onoff)
{
if (!Profile->get_livetrax()) {
return;
}
if (onoff) {
livetrax_stereo_out_button->set_active_state (Gtkmm2ext::Off);
livetrax_multi_out_button->set_active_state (Gtkmm2ext::ExplicitActive);
} else {
livetrax_stereo_out_button->set_active_state (Gtkmm2ext::ExplicitActive);
livetrax_multi_out_button->set_active_state (Gtkmm2ext::Off);
}
}

View File

@ -209,6 +209,11 @@ ARDOUR_UI::set_session (Session *s)
_session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::map_transport_state, this), gui_context());
_session->DirtyChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::session_dirty_changed, this), gui_context());
if (Profile->get_livetrax()) {
_session->VirtualSoundCheckChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::virtual_soundcheck_changed, this, _1), gui_context());
virtual_soundcheck_changed (_session->virtual_soundcheck());
}
_session->PunchLoopConstraintChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::set_punch_sensitivity, this), gui_context());
_session->auto_punch_location_changed.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::set_punch_sensitivity, this), gui_context ());

View File

@ -555,8 +555,8 @@ ARDOUR_UI::install_actions ()
ActionManager::transport_sensitive_actions.push_back (act);
if (Profile->get_livetrax()) {
act = ActionManager::register_toggle_action (common_actions, X_("disable-virtual-soundcheck"), _("Disable Virtual Soundcheck"), sigc::mem_fun (*this, &ARDOUR_UI::disable_virtual_soundcheck));
act = ActionManager::register_toggle_action (common_actions, X_("enable-virtual-soundcheck"), _("Enable Virtual Soundcheck"), sigc::mem_fun (*this, &ARDOUR_UI::enable_virtual_soundcheck));
act = ActionManager::register_action (common_actions, X_("disable-virtual-soundcheck"), _("Disable Virtual Soundcheck"), sigc::mem_fun (*this, &ARDOUR_UI::disable_virtual_soundcheck));
act = ActionManager::register_action (common_actions, X_("enable-virtual-soundcheck"), _("Enable Virtual Soundcheck"), sigc::mem_fun (*this, &ARDOUR_UI::enable_virtual_soundcheck));
}
}