summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/engine_dialog.cc14
-rw-r--r--gtk2_ardour/engine_dialog.h1
2 files changed, 14 insertions, 1 deletions
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc
index eaf440a5b6..a1beea676b 100644
--- a/gtk2_ardour/engine_dialog.cc
+++ b/gtk2_ardour/engine_dialog.cc
@@ -93,6 +93,7 @@ EngineControl::EngineControl ()
, ignore_changes (0)
, _desired_sample_rate (0)
, started_at_least_once (false)
+ , queue_device_changed (false)
{
using namespace Notebook_Helpers;
vector<string> backend_names;
@@ -919,6 +920,15 @@ EngineControl::device_changed ()
assert (backend);
string device_name = device_combo.get_active_text ();
vector<string> s;
+
+ if (device_name != backend->device_name()) {
+ /* we set the backend-device to query various device related intormation.
+ * This has the side effect that backend->device_name() will match
+ * the device_name and 'change_device' will never be true.
+ * so work around this by setting...
+ */
+ queue_device_changed = true;
+ }
//the device name must be set FIRST so ASIO can populate buffersizes and the control panel button
backend->set_device_name(device_name);
@@ -1502,7 +1512,7 @@ EngineControl::push_state_to_backend (bool start)
}
}
- if (get_device_name() != backend->device_name()) {
+ if (queue_device_changed || get_device_name() != backend->device_name()) {
change_device = true;
}
@@ -1571,6 +1581,8 @@ EngineControl::push_state_to_backend (bool start)
}
}
+ queue_device_changed = false;
+
if (!_have_control) {
/* We do not have control over the backend, so the best we can
diff --git a/gtk2_ardour/engine_dialog.h b/gtk2_ardour/engine_dialog.h
index 5b52ac7074..75dc9deb3e 100644
--- a/gtk2_ardour/engine_dialog.h
+++ b/gtk2_ardour/engine_dialog.h
@@ -119,6 +119,7 @@ class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList {
uint32_t ignore_changes;
uint32_t _desired_sample_rate;
bool started_at_least_once;
+ bool queue_device_changed;
void driver_changed ();
void backend_changed ();