From 9a0abf4a45c516b15d74ab41f8dab8348d6b00c9 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 15 Jun 2016 07:53:25 +0200 Subject: Make sure we abide the samplerate in all input/output engines. --- drumgizmo/input/midifile.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drumgizmo/input/midifile.cc') 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& even void MidifileInputEngine::post() { } + +void MidifileInputEngine::setSampleRate(double sample_rate) +{ + this->samplerate = sample_rate; +} -- cgit v1.2.3