summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/EventSink.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-30 21:12:16 +0000
committerDavid Robillard <d@drobilla.net>2007-09-30 21:12:16 +0000
commit399ddfc5b1d4f1f131362d0439821778c6681b23 (patch)
treee8ca2536fa251f474817d0575bc3b4747c494954 /src/libs/engine/EventSink.hpp
parentc40ddfc0eebbcb3333d6cc9e3df7fb62ecb45941 (diff)
downloadingen-399ddfc5b1d4f1f131362d0439821778c6681b23.tar.gz
ingen-399ddfc5b1d4f1f131362d0439821778c6681b23.tar.bz2
ingen-399ddfc5b1d4f1f131362d0439821778c6681b23.zip
Better design for process() signature (pass everything needed in a single object parameter).
Working port "monitoring" (connect an output to a control input, GUI will animate controller). git-svn-id: http://svn.drobilla.net/lad/ingen@788 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/EventSink.hpp')
-rw-r--r--src/libs/engine/EventSink.hpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libs/engine/EventSink.hpp b/src/libs/engine/EventSink.hpp
index 27407684..b7753a79 100644
--- a/src/libs/engine/EventSink.hpp
+++ b/src/libs/engine/EventSink.hpp
@@ -20,12 +20,15 @@
#include <list>
#include <utility>
-#include <raul/DoubleBuffer.hpp>
+#include <raul/RingBuffer.hpp>
+#include "events/SendPortValueEvent.hpp"
#include "types.hpp"
namespace Ingen {
class Port;
+class Engine;
+class SendPortValueEvent;
/** Sink for events generated in the audio thread.
@@ -39,16 +42,18 @@ class Port;
class EventSink
{
public:
- EventSink(size_t capacity) : _capacity(capacity) {}
+ EventSink(Engine& engine, size_t capacity) : _engine(engine), _events(capacity) {}
/* FIXME: Figure out variable sized event queues and make this a generic
* interface (ie don't add a method for every event type, crap..) */
- void control_change(Port* port, float val);
+ void control_change(Port* port, FrameTime time, float val);
+
+ bool read_control_change(SendPortValueEvent& ev);
private:
- size_t _capacity;
- //Raul::List<std::pair<Port*, Raul::DoubleBuffer<float> > > _ports;
+ Engine& _engine;
+ Raul::RingBuffer<uchar> _events;
};