mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
Update Latency UI, subscribe to changes
This commit is contained in:
parent
6d7bc4ea30
commit
feab950ea0
2 changed files with 10 additions and 3 deletions
|
|
@ -126,13 +126,17 @@ void
|
|||
LatencyGUI::reset ()
|
||||
{
|
||||
_latent.unset_user_latency ();
|
||||
adjustment.set_value (_latent.signal_latency ());
|
||||
initial_value = std::min (sample_rate, _latent.signal_latency ());
|
||||
adjustment.set_value (initial_value);
|
||||
}
|
||||
|
||||
void
|
||||
LatencyGUI::refresh ()
|
||||
{
|
||||
initial_value = _latent.effective_latency ();
|
||||
/* limit to adjustment range, otherwise LatencyGUI::finish() would
|
||||
* set the adjustment's value as custom-latency
|
||||
*/
|
||||
initial_value = std::min (sample_rate, _latent.effective_latency ());
|
||||
adjustment.set_value (initial_value);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -539,6 +539,8 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
|
|||
|
||||
insert->AutomationStateChanged.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::automation_state_changed, this), gui_context());
|
||||
|
||||
insert->LatencyChanged.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::set_latency_label, this), gui_context());
|
||||
|
||||
automation_state_changed();
|
||||
}
|
||||
|
||||
|
|
@ -548,6 +550,7 @@ PlugUIBase::~PlugUIBase()
|
|||
delete stats_gui;
|
||||
delete preset_gui;
|
||||
delete latency_gui;
|
||||
delete latency_dialog;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -590,9 +593,9 @@ PlugUIBase::latency_button_clicked ()
|
|||
latency_dialog->set_transient_for (*win);
|
||||
}
|
||||
latency_dialog->add (*latency_gui);
|
||||
latency_dialog->signal_hide().connect (sigc::mem_fun (*this, &PlugUIBase::set_latency_label));
|
||||
}
|
||||
|
||||
latency_gui->refresh ();
|
||||
latency_dialog->show_all ();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue