diff options
author | Robin Gareus <robin@gareus.org> | 2015-03-06 06:24:44 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-03-06 06:24:56 +0100 |
commit | 818ed5fe12b295e2d3588e0c4d15adb2bae0f5e5 (patch) | |
tree | 7f5be2310775da72b644907bb928d058bda4f6c5 | |
parent | 6b87e706ebcc8fb45f8ae5b978b661f1912d1f9c (diff) |
update Engine Dialog when devices are dis/connected.
-rw-r--r-- | gtk2_ardour/engine_dialog.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/engine_dialog.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc index c5538a1a15..53b703b689 100644 --- a/gtk2_ardour/engine_dialog.cc +++ b/gtk2_ardour/engine_dialog.cc @@ -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); @@ -2192,6 +2193,13 @@ EngineControl::engine_stopped () } void +EngineControl::device_list_changed () +{ + PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1); + backend_changed(); +} + +void EngineControl::connect_disconnect_click() { if (ARDOUR::AudioEngine::instance()->running()) { diff --git a/gtk2_ardour/engine_dialog.h b/gtk2_ardour/engine_dialog.h index 4948c48c4d..5b52ac7074 100644 --- a/gtk2_ardour/engine_dialog.h +++ b/gtk2_ardour/engine_dialog.h @@ -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 (); |