summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/audio_backend.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour/audio_backend.h')
-rw-r--r--libs/ardour/ardour/audio_backend.h40
1 files changed, 38 insertions, 2 deletions
diff --git a/libs/ardour/ardour/audio_backend.h b/libs/ardour/ardour/audio_backend.h
index 0e39625e8c..cbe0bfce50 100644
--- a/libs/ardour/ardour/audio_backend.h
+++ b/libs/ardour/ardour/audio_backend.h
@@ -239,7 +239,38 @@ class AudioBackend : public PortEngine {
* app is undefined or cannot be launched.
*/
virtual void launch_control_app () = 0;
- /* Basic state control */
+
+ /* @return a vector of strings that describe the available
+ * MIDI options.
+ *
+ * These can be presented to the user to decide which
+ * MIDI drivers, options etc. can be used. The returned strings
+ * should be thought of as the key to a map of possible
+ * approaches to handling MIDI within the backend. Ensure that
+ * the strings will make sense to the user.
+ */
+ virtual std::vector<std::string> enumerate_midi_options () const = 0;
+
+ /* Request the use of the MIDI option named @param option, which
+ * should be one of the strings returned by enumerate_midi_options()
+ *
+ * @return zero if successful, non-zero otherwise
+ */
+ virtual int set_midi_option (const std::string& option) = 0;
+
+ virtual std::string midi_option () const = 0;
+
+ /* State Control */
+
+ /* non-virtual method to avoid possible overrides of default
+ * parameters. See Scott Meyers or other books on C++ to
+ * understand this pattern, or possibly just this:
+ *
+ * http://stackoverflow.com/questions/12139786/good-pratice-default-arguments-for-pure-virtual-method
+ */
+ int start (bool for_latency_measurement=false) {
+ return _start (for_latency_measurement);
+ }
/** Start using the device named in the most recent call
* to set_device(), with the parameters set by various
@@ -250,9 +281,14 @@ class AudioBackend : public PortEngine {
* the AudioEngine referenced by @param engine. These calls will
* occur in a thread created by and/or under the control of the backend.
*
+ * @param for_latency_measurement if true, the device is being started
+ * to carry out latency measurements and the backend should this
+ * take care to return latency numbers that do not reflect
+ * any existing systemic latency settings.
+ *
* Return zero if successful, negative values otherwise.
*/
- virtual int start () = 0;
+ virtual int _start (bool for_latency_measurement) = 0;
/** Stop using the device currently in use.
*