From a5f69910e493981f4295b8aaf72f4f93ea7055ef Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 5 Aug 2013 13:19:23 -0400 Subject: add notion of unavailable devices to ARDOUR::AudioBackend --- libs/ardour/ardour/audio_backend.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'libs/ardour/ardour/audio_backend.h') 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 enumerate_devices () const = 0; + virtual std::vector 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 -- cgit v1.2.3