Remove ambiguous API implementation

* PortEngine::available() implementation
* AudioEngine::connected() wrapper

Eventually we may re-introduce PortEngine::available along
with a libardour internal port-engine.
This commit is contained in:
Robin Gareus 2018-11-28 15:32:40 +01:00
parent 81857a947c
commit 076e9fddd4
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
12 changed files with 2 additions and 46 deletions

View File

@ -123,7 +123,6 @@ class LIBARDOUR_API AudioEngine : public PortManager, public SessionHandlePtr
void launch_device_control_app();
bool is_realtime() const;
bool connected() const;
// for the user which hold state_lock to check if reset operation is pending
bool is_reset_requested() const { return g_atomic_int_get(const_cast<gint*>(&_hw_reset_request_count)); }

View File

@ -101,12 +101,6 @@ public:
*/
virtual const std::string& my_name() const = 0;
/** Return true if the underlying mechanism/API is still available
* for us to utilize. return false if some or all of the AudioBackend
* API can no longer be effectively used.
*/
virtual bool available() const = 0;
/** Return the maximum size of a port name
*/
virtual uint32_t port_name_size() const = 0;

View File

@ -1036,16 +1036,6 @@ AudioEngine::is_realtime() const
return _backend->is_realtime();
}
bool
AudioEngine::connected() const
{
if (!_backend) {
return false;
}
return _backend->available();
}
void
AudioEngine::transport_start ()
{

View File

@ -1171,12 +1171,6 @@ AlsaAudioBackend::my_name () const
return _instance_name;
}
bool
AlsaAudioBackend::available () const
{
return _run && _active;
}
uint32_t
AlsaAudioBackend::port_name_size () const
{

View File

@ -270,7 +270,6 @@ class AlsaAudioBackend : public AudioBackend {
void* private_handle () const;
const std::string& my_name () const;
bool available () const;
uint32_t port_name_size () const;
int set_port_name (PortHandle, const std::string&);

View File

@ -914,12 +914,6 @@ CoreAudioBackend::my_name () const
return _instance_name;
}
bool
CoreAudioBackend::available () const
{
return _run && _active_fw && _active_ca;
}
uint32_t
CoreAudioBackend::port_name_size () const
{

View File

@ -316,7 +316,6 @@ class CoreAudioBackend : public AudioBackend {
void* private_handle () const;
const std::string& my_name () const;
bool available () const;
uint32_t port_name_size () const;
int set_port_name (PortHandle, const std::string&);

View File

@ -635,12 +635,6 @@ DummyAudioBackend::my_name () const
return _instance_name;
}
bool
DummyAudioBackend::available () const
{
return _running;
}
uint32_t
DummyAudioBackend::port_name_size () const
{

View File

@ -323,7 +323,6 @@ class DummyAudioBackend : public AudioBackend {
void* private_handle () const;
const std::string& my_name () const;
bool available () const;
uint32_t port_name_size () const;
int set_port_name (PortHandle, const std::string&);

View File

@ -47,7 +47,6 @@ class JACKAudioBackend : public AudioBackend {
std::string name() const;
void* private_handle() const;
bool available() const;
bool is_realtime () const;
bool requires_driver_selection() const;
@ -243,6 +242,8 @@ class JACKAudioBackend : public AudioBackend {
void set_jack_callbacks ();
int reconnect_to_jack ();
bool available() const;
struct ThreadData {
JACKAudioBackend* engine;
boost::function<void()> f;

View File

@ -1196,12 +1196,6 @@ PortAudioBackend::my_name () const
return _instance_name;
}
bool
PortAudioBackend::available () const
{
return _run && _active;
}
uint32_t
PortAudioBackend::port_name_size () const
{

View File

@ -250,7 +250,6 @@ class PortAudioBackend : public AudioBackend {
void* private_handle () const;
const std::string& my_name () const;
bool available () const;
uint32_t port_name_size () const;
int set_port_name (PortHandle, const std::string&);