summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/ardour/audio_backend.h11
-rw-r--r--libs/backends/jack/jack_audiobackend.cc12
-rw-r--r--libs/backends/jack/jack_audiobackend.h3
3 files changed, 26 insertions, 0 deletions
diff --git a/libs/ardour/ardour/audio_backend.h b/libs/ardour/ardour/audio_backend.h
index 77b7eadb48..4192f0ea8b 100644
--- a/libs/ardour/ardour/audio_backend.h
+++ b/libs/ardour/ardour/audio_backend.h
@@ -147,6 +147,17 @@ class AudioBackend {
*/
virtual uint32_t available_output_channel_count (const std::string& device) const = 0;
+ /* Return true if the derived class can change the sample rate of the
+ * device in use while the device is already being used. Return false
+ * otherwise. (example: JACK cannot do this as of September 2013)
+ */
+ virtual bool can_change_sample_rate_when_running () const = 0;
+ /* Return true if the derived class can change the buffer size of the
+ * device in use while the device is already being used. Return false
+ * otherwise.
+ */
+ virtual bool can_change_buffer_size_when_running () const = 0;
+
/* Set the hardware parameters.
*
* If called when the current state is stopped or paused,
diff --git a/libs/backends/jack/jack_audiobackend.cc b/libs/backends/jack/jack_audiobackend.cc
index 22e5a525ea..f452a78d49 100644
--- a/libs/backends/jack/jack_audiobackend.cc
+++ b/libs/backends/jack/jack_audiobackend.cc
@@ -935,3 +935,15 @@ JACKAudioBackend::n_physical (unsigned long flags) const
return c;
}
+
+bool
+JACKAudioBackend::can_change_sample_rate_when_running () const
+{
+ return false;
+}
+
+bool
+JACKAudioBackend::can_change_buffer_size_when_running () const
+{
+ return true;
+}
diff --git a/libs/backends/jack/jack_audiobackend.h b/libs/backends/jack/jack_audiobackend.h
index 5ba9ee63d7..f47b630f49 100644
--- a/libs/backends/jack/jack_audiobackend.h
+++ b/libs/backends/jack/jack_audiobackend.h
@@ -61,6 +61,9 @@ class JACKAudioBackend : public AudioBackend {
uint32_t available_input_channel_count (const std::string& device) const;
uint32_t available_output_channel_count (const std::string& device) const;
+ bool can_change_sample_rate_when_running() const;
+ bool can_change_buffer_size_when_running() const;
+
int set_device_name (const std::string&);
int set_sample_rate (float);
int set_buffer_size (uint32_t);