summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-10-12 10:02:37 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-10-12 10:02:37 -0400
commit057f06703b22065ac6a6c902d981ca6306ee2dc5 (patch)
tree02628c9d186174b887d5bbc12266bc54bcfa4768 /libs/ardour
parentb688dc802f43c94e9aba1e97d4f1e27b36496bfe (diff)
slightly change AudioBackend API to allow specifying that the device is being started for latency measurement
We don't want any existing latency settings used when re-measuring latency measurements.
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/audio_backend.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/libs/ardour/ardour/audio_backend.h b/libs/ardour/ardour/audio_backend.h
index 4f7a153eec..cbe0bfce50 100644
--- a/libs/ardour/ardour/audio_backend.h
+++ b/libs/ardour/ardour/audio_backend.h
@@ -262,6 +262,16 @@ class AudioBackend : public PortEngine {
/* 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
* the most recent calls to set_sample_rate() etc. etc.
@@ -271,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.
*