summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-05-01 09:15:26 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-05-01 09:15:26 -0400
commit392c3a6beff9fbe156062b0f105b529b5cff47ef (patch)
tree485d6d113a16f75d70785612940a0ffb2331c749 /libs
parent66559cd795eb27c389e2dd2d973ec6b280ac2763 (diff)
use AudioBackendInfo::already_configured() to correctly determine if backend requires setup
Fixes issues when using JACK backend in combination with others, that prevented connecting to an existing JACK server.
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/audioengine.cc20
1 files changed, 9 insertions, 11 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index 0b01f97f7a..8d4b17ebd4 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -594,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) {
@@ -1016,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;
}