mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
add 'available' interface to the AudioBackendInfo
If a backend can be loaded, it does not mean that it can be used; e.g. weak-linked jack-backend if libjack is not available.
This commit is contained in:
parent
f3ff1b9669
commit
d991bb10ca
6 changed files with 41 additions and 0 deletions
|
|
@ -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>
|
||||
|
|
@ -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; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue