mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
GUI: follow LatencyUpdated signal handler, prevent duplicate updates
This commit is contained in:
parent
aa2ddb5ea2
commit
2991d74da5
3 changed files with 13 additions and 5 deletions
|
|
@ -837,7 +837,7 @@ private:
|
||||||
|
|
||||||
void toggle_latency_switch ();
|
void toggle_latency_switch ();
|
||||||
void latency_switch_changed ();
|
void latency_switch_changed ();
|
||||||
void session_latency_updated ();
|
void session_latency_updated (bool);
|
||||||
|
|
||||||
void feedback_detected ();
|
void feedback_detected ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -604,7 +604,7 @@ ARDOUR_UI::setup_transport ()
|
||||||
|
|
||||||
/* initialize */
|
/* initialize */
|
||||||
latency_switch_changed ();
|
latency_switch_changed ();
|
||||||
session_latency_updated ();
|
session_latency_updated (true);
|
||||||
|
|
||||||
repack_transport_hbox ();
|
repack_transport_hbox ();
|
||||||
update_clock_visibility ();
|
update_clock_visibility ();
|
||||||
|
|
@ -631,8 +631,16 @@ ARDOUR_UI::latency_switch_changed ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::session_latency_updated ()
|
ARDOUR_UI::session_latency_updated (bool for_playback)
|
||||||
{
|
{
|
||||||
|
if (!for_playback) {
|
||||||
|
/* latency updates happen in pairs, in the following order:
|
||||||
|
* - for capture
|
||||||
|
* - for playback
|
||||||
|
*/
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!_session) {
|
if (!_session) {
|
||||||
route_latency_value.set_text ("--");
|
route_latency_value.set_text ("--");
|
||||||
io_latency_value.set_text ("--");
|
io_latency_value.set_text ("--");
|
||||||
|
|
|
||||||
|
|
@ -204,8 +204,8 @@ ARDOUR_UI::set_session (Session *s)
|
||||||
_session->locations()->removed.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context());
|
_session->locations()->removed.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context());
|
||||||
_session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::session_parameter_changed, this, _1), gui_context ());
|
_session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::session_parameter_changed, this, _1), gui_context ());
|
||||||
|
|
||||||
_session->LatencyUpdated.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::session_latency_updated, this), gui_context());
|
_session->LatencyUpdated.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::session_latency_updated, this, _1), gui_context());
|
||||||
session_latency_updated ();
|
session_latency_updated (true);
|
||||||
|
|
||||||
/* Clocks are on by default after we are connected to a session, so show that here.
|
/* Clocks are on by default after we are connected to a session, so show that here.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue