summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/audio_backend.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-10-21 11:33:38 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-10-21 11:33:38 -0400
commit613fc12e7325d15a586b5bf8013a78d3654e80d7 (patch)
tree64a869c5d467bea5b2d4e47888995a7657cafd27 /libs/ardour/ardour/audio_backend.h
parent3e4b60872414b26bcc9d7632f91364f5246e1692 (diff)
add default sample rate and buffer size methods to AudioBackend
Diffstat (limited to 'libs/ardour/ardour/audio_backend.h')
-rw-r--r--libs/ardour/ardour/audio_backend.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/libs/ardour/ardour/audio_backend.h b/libs/ardour/ardour/audio_backend.h
index cbe0bfce50..21f050afdd 100644
--- a/libs/ardour/ardour/audio_backend.h
+++ b/libs/ardour/ardour/audio_backend.h
@@ -117,6 +117,17 @@ class AudioBackend : public PortEngine {
* at any time.
*/
virtual std::vector<float> available_sample_rates (const std::string& device) const = 0;
+
+ /* Returns the default sample rate that will be shown to the user when
+ * configuration options are first presented. If the derived class
+ * needs or wants to override this, it can. It also MUST override this
+ * if there is any chance that an SR of 44.1kHz is not in the list
+ * returned by available_sample_rates()
+ */
+ virtual float default_sample_rate () const {
+ return 44100.0;
+ }
+
/** Returns a collection of uint32 identifying buffer sizes that are
* potentially usable with the hardware identified by @param device.
* Any of these values may be supplied in other calls to this backend
@@ -126,6 +137,16 @@ class AudioBackend : public PortEngine {
*/
virtual std::vector<uint32_t> available_buffer_sizes (const std::string& device) const = 0;
+ /* Returns the default buffer size that will be shown to the user when
+ * configuration options are first presented. If the derived class
+ * needs or wants to override this, it can. It also MUST override this
+ * if there is any chance that a buffer size of 1024 is not in the list
+ * returned by available_buffer_sizes()
+ */
+ virtual uint32_t default_buffer_size () const {
+ return 1024;
+ }
+
/** Returns the maximum number of input channels that are potentially
* usable with the hardware identified by @param device. Any number from 1
* to the value returned may be supplied in other calls to this backend as