summaryrefslogtreecommitdiff
path: root/drumgizmo/input/midifile.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-06-15 07:53:25 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-06-15 07:54:08 +0200
commit9a0abf4a45c516b15d74ab41f8dab8348d6b00c9 (patch)
tree1e915664db627f2dd124ee08a0cebe3d6c306b3c /drumgizmo/input/midifile.cc
parent149d86611985b7a382994ac684d555660927e8d2 (diff)
Make sure we abide the samplerate in all input/output engines.
Diffstat (limited to 'drumgizmo/input/midifile.cc')
-rw-r--r--drumgizmo/input/midifile.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/drumgizmo/input/midifile.cc b/drumgizmo/input/midifile.cc
index 27a8e04..6a24a00 100644
--- a/drumgizmo/input/midifile.cc
+++ b/drumgizmo/input/midifile.cc
@@ -40,7 +40,7 @@ MidifileInputEngine::MidifileInputEngine()
, track{-1} // all tracks
, loop{false}
, offset{0.0}
- , samplerate{44100.0} // todo: via ctor arg
+ , samplerate{44100.0}
{
}
@@ -190,3 +190,8 @@ void MidifileInputEngine::run(size_t pos, size_t len, std::vector<event_t>& even
void MidifileInputEngine::post()
{
}
+
+void MidifileInputEngine::setSampleRate(double sample_rate)
+{
+ this->samplerate = sample_rate;
+}