tentative fix for requesting driver+device list from backend
authorRobin Gareus <robin@gareus.org>
Sun, 1 Jun 2014 19:43:03 +0000 (21:43 +0200)
committerRobin Gareus <robin@gareus.org>
Mon, 2 Jun 2014 17:21:15 +0000 (19:21 +0200)
gtk2_ardour/engine_dialog.cc

index e3d40702ef7a73464c46ff47fc7f8a73eedafa7f..359a8f8194680486c2da600483dbff7a171a1b67 100644 (file)
@@ -271,10 +271,6 @@ EngineControl::EngineControl ()
 
        backend_changed ();
 
-       if (audio_setup) {
-               set_state (*audio_setup);
-       }
-
        /* Connect to signals */
 
        driver_combo.signal_changed().connect (sigc::mem_fun (*this, &EngineControl::driver_changed));
@@ -288,6 +284,10 @@ EngineControl::EngineControl ()
        input_channels.signal_changed().connect (sigc::mem_fun (*this, &EngineControl::parameter_changed));
        output_channels.signal_changed().connect (sigc::mem_fun (*this, &EngineControl::parameter_changed));
 
+       if (audio_setup) {
+               set_state (*audio_setup);
+       }
+
        notebook.signal_switch_page().connect (sigc::mem_fun (*this, &EngineControl::on_switch_page));
  }
 
@@ -633,10 +633,6 @@ EngineControl::EngineControl ()
  void
  EngineControl::backend_changed ()
  {
-        if (ignore_changes) {
-                return;
-        }
-
         string backend_name = backend_combo.get_active_text();
         boost::shared_ptr<ARDOUR::AudioBackend> backend;
 
@@ -687,7 +683,9 @@ EngineControl::EngineControl ()
                 }
         }
 
-        maybe_display_saved_state ();
+        if (!ignore_changes) {
+                maybe_display_saved_state ();
+        }
  }
 
  bool
@@ -759,25 +757,20 @@ EngineControl::EngineControl ()
  void
  EngineControl::driver_changed ()
  {
-        if (ignore_changes) {
-                return;
-        }
-
         boost::shared_ptr<ARDOUR::AudioBackend> backend = ARDOUR::AudioEngine::instance()->current_backend();
         assert (backend);
 
         backend->set_driver (driver_combo.get_active_text());
         list_devices ();
 
-        maybe_display_saved_state ();
+        if (!ignore_changes) {
+                maybe_display_saved_state ();
+        }
  }
 
  void
  EngineControl::device_changed ()
  {
-        if (ignore_changes) {
-                return;
-        }
 
         boost::shared_ptr<ARDOUR::AudioBackend> backend = ARDOUR::AudioEngine::instance()->current_backend();
         assert (backend);
@@ -875,8 +868,10 @@ EngineControl::EngineControl ()
 
         /* pick up any saved state for this device */
 
-        maybe_display_saved_state ();
- }     
+        if (!ignore_changes) {
+                maybe_display_saved_state ();
+        }
+ }
 
  string
  EngineControl::bufsize_as_string (uint32_t sz)
@@ -892,28 +887,24 @@ EngineControl::EngineControl ()
  void 
  EngineControl::sample_rate_changed ()
  {
-        if (ignore_changes) {
-                return;
-        }
-
         /* reset the strings for buffer size to show the correct msec value
            (reflecting the new sample rate).
         */
 
         show_buffer_duration ();
-        save_state ();
+        if (!ignore_changes) {
+                save_state ();
+        }
 
  }
 
  void 
  EngineControl::buffer_size_changed ()
  {
-        if (ignore_changes) {
-                return;
-        }
-
         show_buffer_duration ();
-        save_state ();
+        if (!ignore_changes) {
+                save_state ();
+        }
  }
 
  void