summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/audio_backend.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-08-05 13:19:23 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-08-05 13:19:23 -0400
commita5f69910e493981f4295b8aaf72f4f93ea7055ef (patch)
tree1e71a2b20b28d32f3c97a459ec63e24349e3d144 /libs/ardour/ardour/audio_backend.h
parenta66e3859e1415cb992320089004eb8a9903cf721 (diff)
add notion of unavailable devices to ARDOUR::AudioBackend
Diffstat (limited to 'libs/ardour/ardour/audio_backend.h')
-rw-r--r--libs/ardour/ardour/audio_backend.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/libs/ardour/ardour/audio_backend.h b/libs/ardour/ardour/audio_backend.h
index 08dd7fb0b5..77b7eadb48 100644
--- a/libs/ardour/ardour/audio_backend.h
+++ b/libs/ardour/ardour/audio_backend.h
@@ -95,12 +95,25 @@ class AudioBackend {
*/
virtual int set_driver (const std::string& /*drivername*/) { return 0; }
- /** Returns a collection of strings identifying devices known
- * to this backend. Any of these strings may be used to identify a
+ /** used to list device names along with whether or not they are currently
+ * available.
+ */
+ struct DeviceStatus {
+ std::string name;
+ bool available;
+
+ DeviceStatus (const std::string& s, bool avail) : name (s), available (avail) {}
+ };
+
+ /** Returns a collection of DeviceStatuses identifying devices discovered
+ * by this backend since the start of the process.
+ *
+ * Any of the names in each DeviceStatus may be used to identify a
* device in other calls to the backend, though any of them may become
* invalid at any time.
*/
- virtual std::vector<std::string> enumerate_devices () const = 0;
+ virtual std::vector<DeviceStatus> enumerate_devices () const = 0;
+
/** Returns a collection of float identifying sample rates that are
* potentially usable with the hardware identified by @param device.
* Any of these values may be supplied in other calls to this backend