summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/port_engine.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-09-13 11:21:15 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-09-13 11:21:15 -0400
commitf9d08daa477230f90c194edc555f77c267b5078c (patch)
tree40bdcac21886bac7010ec71972f2928e8c858982 /libs/ardour/ardour/port_engine.h
parentb085a7993880e1292fb34e8c16d752a7fc4ec7c8 (diff)
change inheritance so that an AudioBackend IS-A PortEngine
This allows a derived (concrete) implementation to share information (e.g. sample rate, buffer size) between the audio backend side of things and the port management side of things.
Diffstat (limited to 'libs/ardour/ardour/port_engine.h')
-rw-r--r--libs/ardour/ardour/port_engine.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/libs/ardour/ardour/port_engine.h b/libs/ardour/ardour/port_engine.h
index 71f93ea05e..8c0ec9e754 100644
--- a/libs/ardour/ardour/port_engine.h
+++ b/libs/ardour/ardour/port_engine.h
@@ -79,6 +79,11 @@ class PortEngine {
PortEngine (PortManager& pm) : manager (pm) {}
virtual ~PortEngine() {}
+ /** Return a private, type-free pointer to any data
+ * that might be useful to a concrete implementation
+ */
+ virtual void* private_handle() const = 0;
+
/* We use void* here so that the API can be defined for any implementation.
*
* We could theoretically use a template (PortEngine<T>) and define
@@ -89,21 +94,16 @@ class PortEngine {
typedef void* PortHandle;
- /** Return a typeless pointer to an object that may be of interest
- * that understands the internals of a particular PortEngine
- * implementation.
- *
- * XXX the existence of this method is a band-aid over some design
- * issues and will it will be removed in the future
- */
- virtual void* private_handle() const = 0;
-
- virtual bool connected() const = 0;
-
/** Return the name of this process as used by the port manager
* when naming ports.
*/
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
*/