fix crash when copy'ing latent plugins
[ardour.git] / libs / backends / jack / jack_api.cc
index abf733d0f556332234118de419b9dc87bcfa357e..b63b1c1f69f8d0580623b351c395374b71ad2f4c 100644 (file)
@@ -29,6 +29,7 @@ static boost::shared_ptr<AudioBackend> backend_factory (AudioEngine& ae);
 static int  instantiate (const std::string& arg1, const std::string& arg2);
 static int  deinstantiate ();
 static bool already_configured ();
+static bool available ();
 
 static ARDOUR::AudioBackendInfo _descriptor = {
        "JACK",
@@ -36,6 +37,7 @@ static ARDOUR::AudioBackendInfo _descriptor = {
        deinstantiate,
        backend_factory,
        already_configured,
+       available
 };
 
 static boost::shared_ptr<AudioBackend>
@@ -64,7 +66,7 @@ instantiate (const std::string& arg1, const std::string& arg2)
        return 0;
 }
 
-static int 
+static int
 deinstantiate ()
 {
        backend.reset ();
@@ -79,5 +81,11 @@ already_configured ()
        return !JackConnection::in_control ();
 }
 
+static bool
+available ()
+{
+       return have_libjack() ? false : true;
+}
+
 extern "C" ARDOURBACKEND_API ARDOUR::AudioBackendInfo* descriptor() { return &_descriptor; }