X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fengine_dialog.cc;h=192c7501318e1c563a90bec328fd9a42e69f28a3;hb=842c33fba81ee7d360bb347a9a011582f6aac95f;hp=8a6c42fd8c79bdb11771d4463dcfe96322fa65b3;hpb=05bc96f4d2bf5f68f5416f287034e86f4e59c11d;p=ardour.git diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc index 8a6c42fd8c..192c750131 100644 --- a/gtk2_ardour/engine_dialog.cc +++ b/gtk2_ardour/engine_dialog.cc @@ -466,10 +466,10 @@ EngineControl::on_response (int response_id) switch (response_id) { case RESPONSE_OK: + hide(); if (!start_engine()) { + show(); return; - } else { - hide(); } #ifdef PLATFORM_WINDOWS @@ -1592,6 +1592,24 @@ void EngineControl::input_device_changed () { DEBUG_ECONTROL ("input_device_changed"); + + boost::shared_ptr backend = ARDOUR::AudioEngine::instance()->current_backend(); + if (backend && backend->match_input_output_devices_or_none ()) { + const std::string& dev_none = ARDOUR::AudioBackend::get_standard_device_name (ARDOUR::AudioBackend::DeviceNone); + + if (get_output_device_name () != dev_none + && get_input_device_name () != dev_none + && get_input_device_name () != get_output_device_name ()) { + block_changed_signals (); + if (contains_value (output_device_combo, get_input_device_name ())) { + output_device_combo.set_active_text (get_input_device_name ()); + } else { + assert (contains_value (output_device_combo, dev_none)); + output_device_combo.set_active_text (dev_none); + } + unblock_changed_signals (); + } + } device_changed (); } @@ -1599,6 +1617,23 @@ void EngineControl::output_device_changed () { DEBUG_ECONTROL ("output_device_changed"); + boost::shared_ptr backend = ARDOUR::AudioEngine::instance()->current_backend(); + if (backend && backend->match_input_output_devices_or_none ()) { + const std::string& dev_none = ARDOUR::AudioBackend::get_standard_device_name (ARDOUR::AudioBackend::DeviceNone); + + if (get_input_device_name () != dev_none + && get_input_device_name () != dev_none + && get_input_device_name () != get_output_device_name ()) { + block_changed_signals (); + if (contains_value (input_device_combo, get_output_device_name ())) { + input_device_combo.set_active_text (get_output_device_name ()); + } else { + assert (contains_value (input_device_combo, dev_none)); + input_device_combo.set_active_text (dev_none); + } + unblock_changed_signals (); + } + } device_changed (); }