fix errors in manual conflict resolution
[ardour.git] / libs / ardour / audioengine.cc
index d6a511fdadab71bed5bcd0e31a0f3fb67e39dd9f..77d7731edf3824478ef5f50a357a2580d07b1ad3 100644 (file)
@@ -480,7 +480,7 @@ AudioEngine::discover_backends ()
                Glib::PatternSpec dll_extension_pattern("*backendRDC.dll");
        #endif
 #else
-       Glib::PatternSpec dll_extension_pattern("*backend.dll");
+       Glib::PatternSpec dll_extension_pattern("*backend*.dll");
 #endif
        
        find_matching_files_in_search_path (backend_search_path (),
@@ -564,6 +564,7 @@ AudioEngine::drop_backend ()
 {
        if (_backend) {
                _backend->stop ();
+        _backend->drop_device();
                _backend.reset ();
        }
 }
@@ -593,7 +594,7 @@ AudioEngine::set_backend (const std::string& name, const std::string& arg1, cons
                if (b->second->instantiate (arg1, arg2)) {
                        throw failed_constructor ();
                }
-
+               
                _backend = b->second->factory (*this);
 
        } catch (exception& e) {
@@ -1015,17 +1016,15 @@ AudioEngine::halted_callback (const char* why)
 bool
 AudioEngine::setup_required () const
 {
-       /* If there is only a single backend and it claims to be configured
-        * already there is no setup to be done.
-        *
-        * Primarily for a case where there is only a JACK backend and
-        * JACK is already running.
-        */
-        
-       if (_backends.size() == 1 && _backends.begin()->second->already_configured()) {
-               return false;
+       if (_backend) {
+               if (_backend->info().already_configured())
+                       return false;
+       } else {
+               if (_backends.size() == 1 && _backends.begin()->second->already_configured()) {
+                       return false;
+               }
        }
-
+       
        return true;
 }