Remove ambiguous API implementation
authorRobin Gareus <robin@gareus.org>
Wed, 28 Nov 2018 14:32:40 +0000 (15:32 +0100)
committerRobin Gareus <robin@gareus.org>
Wed, 28 Nov 2018 14:32:40 +0000 (15:32 +0100)
* PortEngine::available() implementation
* AudioEngine::connected() wrapper

Eventually we may re-introduce PortEngine::available along
with a libardour internal port-engine.

12 files changed:
libs/ardour/ardour/audioengine.h
libs/ardour/ardour/port_engine.h
libs/ardour/audioengine.cc
libs/backends/alsa/alsa_audiobackend.cc
libs/backends/alsa/alsa_audiobackend.h
libs/backends/coreaudio/coreaudio_backend.cc
libs/backends/coreaudio/coreaudio_backend.h
libs/backends/dummy/dummy_audiobackend.cc
libs/backends/dummy/dummy_audiobackend.h
libs/backends/jack/jack_audiobackend.h
libs/backends/portaudio/portaudio_backend.cc
libs/backends/portaudio/portaudio_backend.h

index 4548ad7391b13252a8ca204bede8ead0cfd18a7a..664309e935e090e3d3495ebf8c42f79f3a2b46df 100644 (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)); }
index dc61c3fdad3235a163acd93a594c95f1c61fe01e..358211cddf5b951afedca514d917f4f47bce04eb 100644 (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;
index ba4dc4348a7e07052b1f0094bf1f6db596d5bf07..510788180e7cfa01379f3f8c19e44468d986615f 100644 (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 ()
 {
index 9594f31d98e326fe106c8b4df4c10b14b99721c1..ee1c6d6dce7e2d230bb2ab9484156a048422b1b8 100644 (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
 {
index 11623cfcf4921eb7c970dcab9f3f96da08ef16be..c74f881fd15c7745ec29fe960bda614040343508 100644 (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&);
index 4c02c32ec8608b4d7c0d21dd28bf8e94d5841151..642ad2eac6f7eb81c86db56f11927b470f994781 100644 (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
 {
index 712deca97bc1ac058ff72fa3a3a19c816e0045ab..e455d59a9381f5fc193c7c609ac491c4b91f3b1c 100644 (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&);
index e32eed8852bf530d20a4688617417d2281c8addd..6caacbea24602380610ca8a4e587a9a2245c624f 100644 (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
 {
index e687321abfc31bad9936827215d850d270a98af3..f8309b1f771877be4042fd80d2de144650629597 100644 (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&);
index bd4886651f5ec3bc9765e476483c03e01d605aeb..fdb72e03ce8d5c70054d8c89d80f056aa1eccee7 100644 (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;
index b7afb4c48d70623b403b6eb2765b94702e0fc722..d5c99f5ee73edcc63216b503629bae7caf5f0a05 100644 (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
 {
index da16d826c4f1296dfc4d20515ca79148f07eef16..b6f7fb839b3413843a6eff384d935d8b5d655633 100644 (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&);