summaryrefslogtreecommitdiff
path: root/drumgizmo
diff options
context:
space:
mode:
Diffstat (limited to 'drumgizmo')
-rw-r--r--drumgizmo/input/inputdummy.cc5
-rw-r--r--drumgizmo/input/inputdummy.h1
-rw-r--r--drumgizmo/input/jackmidi.cc5
-rw-r--r--drumgizmo/input/jackmidi.h1
-rw-r--r--drumgizmo/input/midifile.cc5
-rw-r--r--drumgizmo/input/midifile.h1
-rw-r--r--drumgizmo/input/test.cc5
-rw-r--r--drumgizmo/input/test.h1
8 files changed, 24 insertions, 0 deletions
diff --git a/drumgizmo/input/inputdummy.cc b/drumgizmo/input/inputdummy.cc
index 971ef29..54643ae 100644
--- a/drumgizmo/input/inputdummy.cc
+++ b/drumgizmo/input/inputdummy.cc
@@ -63,3 +63,8 @@ void DummyInputEngine::run(size_t pos, size_t len, std::vector<event_t>& events)
void DummyInputEngine::post()
{
}
+
+bool DummyInputEngine::isFreewheeling() const
+{
+ return false;
+}
diff --git a/drumgizmo/input/inputdummy.h b/drumgizmo/input/inputdummy.h
index 7888f33..9420319 100644
--- a/drumgizmo/input/inputdummy.h
+++ b/drumgizmo/input/inputdummy.h
@@ -42,4 +42,5 @@ public:
void pre() override;
void run(size_t pos, size_t len, std::vector<event_t>& events) override;
void post() override;
+ bool isFreewheeling() const override;
};
diff --git a/drumgizmo/input/jackmidi.cc b/drumgizmo/input/jackmidi.cc
index 7eeae7d..7c5cf1c 100644
--- a/drumgizmo/input/jackmidi.cc
+++ b/drumgizmo/input/jackmidi.cc
@@ -101,6 +101,11 @@ void JackMidiInputEngine::post()
{
}
+bool JackMidiInputEngine::isFreewheeling() const
+{
+ return client.isFreewheeling();
+}
+
void JackMidiInputEngine::process(jack_nframes_t num_frames)
{
assert(port != nullptr);
diff --git a/drumgizmo/input/jackmidi.h b/drumgizmo/input/jackmidi.h
index 1532b18..96e2d03 100644
--- a/drumgizmo/input/jackmidi.h
+++ b/drumgizmo/input/jackmidi.h
@@ -50,6 +50,7 @@ public:
void pre() override;
void run(size_t pos, size_t len, std::vector<event_t>& events) override;
void post() override;
+ bool isFreewheeling() const override;
// based on JackProcess
void process(jack_nframes_t num_frames) override;
diff --git a/drumgizmo/input/midifile.cc b/drumgizmo/input/midifile.cc
index 6a24a00..89ffa6b 100644
--- a/drumgizmo/input/midifile.cc
+++ b/drumgizmo/input/midifile.cc
@@ -195,3 +195,8 @@ void MidifileInputEngine::setSampleRate(double sample_rate)
{
this->samplerate = sample_rate;
}
+
+bool MidifileInputEngine::isFreewheeling() const
+{
+ return true;
+}
diff --git a/drumgizmo/input/midifile.h b/drumgizmo/input/midifile.h
index 518d8d2..5756718 100644
--- a/drumgizmo/input/midifile.h
+++ b/drumgizmo/input/midifile.h
@@ -50,6 +50,7 @@ public:
void run(size_t pos, size_t len, std::vector<event_t>& events) override;
void post() override;
void setSampleRate(double sample_rate) override;
+ bool isFreewheeling() const override;
private:
smf_t* smf;
diff --git a/drumgizmo/input/test.cc b/drumgizmo/input/test.cc
index 5025d2c..75b6774 100644
--- a/drumgizmo/input/test.cc
+++ b/drumgizmo/input/test.cc
@@ -118,3 +118,8 @@ void TestInputEngine::setSampleRate(double sample_rate)
{
this->sample_rate = sample_rate;
}
+
+bool TestInputEngine::isFreewheeling() const
+{
+ return false;
+}
diff --git a/drumgizmo/input/test.h b/drumgizmo/input/test.h
index 70936ea..baf7c95 100644
--- a/drumgizmo/input/test.h
+++ b/drumgizmo/input/test.h
@@ -46,6 +46,7 @@ public:
void run(size_t pos, size_t len, std::vector<event_t>& events) override;
void post() override;
void setSampleRate(double sample_rate) override;
+ bool isFreewheeling() const override;
private:
float probability;