summaryrefslogtreecommitdiff
path: root/src/inputprocessor.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-06-14 21:13:28 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-06-14 21:13:28 +0200
commit9453078f2d66fad806ee104e7c6993bba1043c6a (patch)
tree3b1ffe1e7b67c7d626336d835b44203f2c2c6ac5 /src/inputprocessor.h
parent1bc07f860fa7f01763586f45b7fb2e53cd1c2557 (diff)
New input processor filter system. Moved processing from Instrument calss to new input processing filter system and prepared for new latency filter.
Diffstat (limited to 'src/inputprocessor.h')
-rw-r--r--src/inputprocessor.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/inputprocessor.h b/src/inputprocessor.h
index 83a4f5b..13ac4ad 100644
--- a/src/inputprocessor.h
+++ b/src/inputprocessor.h
@@ -28,17 +28,25 @@
#include <vector>
#include <list>
+#include <memory>
+
+#include <event.h>
#include "drumkit.h"
#include "events.h"
-#include <event.h>
+#include "inputfilter.h"
+
+class Settings;
class InputProcessor
{
public:
- InputProcessor(DrumKit& kit, std::list<Event*>* activeevents);
+ InputProcessor(Settings& settings,
+ DrumKit& kit,
+ std::list<Event*>* activeevents);
- bool process(const std::vector<event_t>& events, size_t pos,
+ bool process(std::vector<event_t>& events,
+ std::size_t pos,
double resample_ratio);
std::size_t getLatency() const;
@@ -48,6 +56,8 @@ private:
std::list<Event*>* activeevents;
bool is_stopping; ///< Is set to true when a TYPE_STOP event has been seen.
- bool processOnset(const event_t& event, size_t pos, double resample_ratio);
- bool processStop(const event_t& event);
+ bool processOnset(event_t& event, std::size_t pos, double resample_ratio);
+ bool processStop(event_t& event);
+
+ std::vector<std::unique_ptr<InputFilter>> filters;
};