summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drumgizmo.cc4
-rw-r--r--src/inputprocessor.cc5
-rw-r--r--src/inputprocessor.h5
3 files changed, 8 insertions, 6 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc
index 63eda7b..66d071d 100644
--- a/src/drumgizmo.cc
+++ b/src/drumgizmo.cc
@@ -52,7 +52,7 @@ DrumGizmo::DrumGizmo(Settings& settings,
, oe(o)
, ie(i)
, kit()
- , input_processor(kit)
+ , input_processor(kit, activeevents)
, framesize(0)
, freewheel(false)
, events{}
@@ -230,7 +230,7 @@ bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples)
ie->run(pos, nsamples, events);
double resample_ratio = resampler[0].getRatio();
- bool active_events_left = input_processor.process(events, activeevents, pos, resample_ratio);
+ bool active_events_left = input_processor.process(events, pos, resample_ratio);
if(!active_events_left)
{
diff --git a/src/inputprocessor.cc b/src/inputprocessor.cc
index 789334b..a232e35 100644
--- a/src/inputprocessor.cc
+++ b/src/inputprocessor.cc
@@ -32,14 +32,15 @@
#include "instrument.h"
-InputProcessor::InputProcessor(DrumKit& kit)
+InputProcessor::InputProcessor(DrumKit& kit, std::list<Event*>* activeevents)
: kit(kit)
+ , activeevents(activeevents)
, is_stopping(false)
{
}
-bool InputProcessor::process(const std::vector<event_t>& events, std::list<Event*>* activeevents, size_t pos, double resample_ratio)
+bool InputProcessor::process(const std::vector<event_t>& events, size_t pos, double resample_ratio)
{
for(const auto& event: events)
{
diff --git a/src/inputprocessor.h b/src/inputprocessor.h
index 24685be..fb12555 100644
--- a/src/inputprocessor.h
+++ b/src/inputprocessor.h
@@ -36,9 +36,10 @@
class InputProcessor
{
public:
- InputProcessor(DrumKit& kit);
- bool process(const std::vector<event_t>& events, std::list<Event*>* activeevents, size_t pos, double resample_ratio);
+ InputProcessor(DrumKit& kit, std::list<Event*>* activeevents);
+ bool process(const std::vector<event_t>& events, size_t pos, double resample_ratio);
private:
DrumKit& kit;
+ std::list<Event*>* activeevents;
bool is_stopping; ///< Is set to true when a TYPE_STOP event has been seen.
};