summaryrefslogtreecommitdiff
path: root/drumgizmo/output
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2016-07-13 16:33:11 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2016-07-13 17:28:11 +0200
commit32606894c67e6be27ba853a8bc3e97c808c14987 (patch)
treef31c9d1bc08e2095b2cd724b5f0f0a27526c5a01 /drumgizmo/output
parentd71485534d3a683cae4993815f59ff68263a6751 (diff)
Introduce output engine isFreewheeling method.
Diffstat (limited to 'drumgizmo/output')
-rw-r--r--drumgizmo/output/alsa.cc5
-rw-r--r--drumgizmo/output/alsa.h1
-rw-r--r--drumgizmo/output/jackaudio.cc5
-rw-r--r--drumgizmo/output/jackaudio.h1
-rw-r--r--drumgizmo/output/outputdummy.cc5
-rw-r--r--drumgizmo/output/outputdummy.h1
-rw-r--r--drumgizmo/output/wavfile.cc5
-rw-r--r--drumgizmo/output/wavfile.h1
8 files changed, 24 insertions, 0 deletions
diff --git a/drumgizmo/output/alsa.cc b/drumgizmo/output/alsa.cc
index aea80a6..1241cad 100644
--- a/drumgizmo/output/alsa.cc
+++ b/drumgizmo/output/alsa.cc
@@ -191,3 +191,8 @@ size_t AlsaOutputEngine::getSamplerate() const
{
return srate;
}
+
+bool AlsaOutputEngine::isFreewheeling() const
+{
+ return false;
+}
diff --git a/drumgizmo/output/alsa.h b/drumgizmo/output/alsa.h
index cc28f94..56011b6 100644
--- a/drumgizmo/output/alsa.h
+++ b/drumgizmo/output/alsa.h
@@ -50,6 +50,7 @@ public:
void run(int ch, sample_t* samples, size_t nsamples) override;
void post(size_t nsamples) override;
size_t getSamplerate() const override;
+ bool isFreewheeling() const override;
private:
snd_pcm_t* handle;
diff --git a/drumgizmo/output/jackaudio.cc b/drumgizmo/output/jackaudio.cc
index 75766d1..2274bea 100644
--- a/drumgizmo/output/jackaudio.cc
+++ b/drumgizmo/output/jackaudio.cc
@@ -123,6 +123,11 @@ size_t JackAudioOutputEngine::getSamplerate() const
return client.getSampleRate();
}
+bool JackAudioOutputEngine::isFreewheeling() const
+{
+ return client.isFreewheeling();
+}
+
void JackAudioOutputEngine::onLatencyChange(std::size_t latency)
{
this->latency = latency;
diff --git a/drumgizmo/output/jackaudio.h b/drumgizmo/output/jackaudio.h
index b8fbcab..ce18f6f 100644
--- a/drumgizmo/output/jackaudio.h
+++ b/drumgizmo/output/jackaudio.h
@@ -49,6 +49,7 @@ public:
void post(size_t nsamples) override;
size_t getBufferSize() const override;
size_t getSamplerate() const override;
+ bool isFreewheeling() const override;
void onLatencyChange(std::size_t latency) override;
// based on JackProcess
diff --git a/drumgizmo/output/outputdummy.cc b/drumgizmo/output/outputdummy.cc
index 4ff0816..3cb3ac4 100644
--- a/drumgizmo/output/outputdummy.cc
+++ b/drumgizmo/output/outputdummy.cc
@@ -63,3 +63,8 @@ void DummyOutputEngine::run(int ch, sample_t* samples, size_t nsamples)
void DummyOutputEngine::post(size_t nsamples)
{
}
+
+bool DummyOutputEngine::isFreewheeling() const
+{
+ return false;
+}
diff --git a/drumgizmo/output/outputdummy.h b/drumgizmo/output/outputdummy.h
index 5a1b2fa..3e24495 100644
--- a/drumgizmo/output/outputdummy.h
+++ b/drumgizmo/output/outputdummy.h
@@ -42,4 +42,5 @@ public:
void pre(size_t nsamples) override;
void run(int ch, sample_t* samples, size_t nsamples) override;
void post(size_t nsamples) override;
+ bool isFreewheeling() const override;
};
diff --git a/drumgizmo/output/wavfile.cc b/drumgizmo/output/wavfile.cc
index 20b63bd..c82a365 100644
--- a/drumgizmo/output/wavfile.cc
+++ b/drumgizmo/output/wavfile.cc
@@ -152,3 +152,8 @@ void WavfileOutputEngine::onLatencyChange(std::size_t latency)
{
this->latency = latency;
}
+
+bool WavfileOutputEngine::isFreewheeling() const
+{
+ return true;
+}
diff --git a/drumgizmo/output/wavfile.h b/drumgizmo/output/wavfile.h
index 656c0cd..63bf0e4 100644
--- a/drumgizmo/output/wavfile.h
+++ b/drumgizmo/output/wavfile.h
@@ -51,6 +51,7 @@ public:
void post(std::size_t nsamples) override;
std::size_t getSamplerate() const override;
void onLatencyChange(std::size_t latency) override;
+ bool isFreewheeling() const override;
private:
SF_INFO info;