update Engine Dialog when devices are dis/connected.

This commit is contained in:
Robin Gareus 2015-03-06 06:24:44 +01:00
parent 6b87e706eb
commit 818ed5fe12
2 changed files with 11 additions and 0 deletions

View File

@ -277,6 +277,7 @@ EngineControl::EngineControl ()
ARDOUR::AudioEngine::instance()->Running.connect (running_connection, MISSING_INVALIDATOR, boost::bind (&EngineControl::engine_running, this), gui_context());
ARDOUR::AudioEngine::instance()->Stopped.connect (stopped_connection, MISSING_INVALIDATOR, boost::bind (&EngineControl::engine_stopped, this), gui_context());
ARDOUR::AudioEngine::instance()->Halted.connect (stopped_connection, MISSING_INVALIDATOR, boost::bind (&EngineControl::engine_stopped, this), gui_context());
ARDOUR::AudioEngine::instance()->DeviceListChanged.connect (devicelist_connection, MISSING_INVALIDATOR, boost::bind (&EngineControl::device_list_changed, this), gui_context());
if (audio_setup) {
set_state (*audio_setup);
@ -2191,6 +2192,13 @@ EngineControl::engine_stopped ()
engine_status.set_markup(string_compose ("<span foreground=\"red\">%1</span>", _("Inactive")));
}
void
EngineControl::device_list_changed ()
{
PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
backend_changed();
}
void
EngineControl::connect_disconnect_click()
{

View File

@ -247,8 +247,11 @@ class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList {
void engine_running ();
void engine_stopped ();
void device_list_changed ();
PBD::ScopedConnection running_connection;
PBD::ScopedConnectionList stopped_connection;
PBD::ScopedConnection devicelist_connection;
void connect_disconnect_click ();
void calibrate_audio_latency ();