diff options
author | David Robillard <d@drobilla.net> | 2007-09-30 21:12:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-09-30 21:12:16 +0000 |
commit | 399ddfc5b1d4f1f131362d0439821778c6681b23 (patch) | |
tree | e8ca2536fa251f474817d0575bc3b4747c494954 /src/libs/engine/Event.hpp | |
parent | c40ddfc0eebbcb3333d6cc9e3df7fb62ecb45941 (diff) | |
download | ingen-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/Event.hpp')
-rw-r--r-- | src/libs/engine/Event.hpp | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/libs/engine/Event.hpp b/src/libs/engine/Event.hpp index fe0112d3..5860da2a 100644 --- a/src/libs/engine/Event.hpp +++ b/src/libs/engine/Event.hpp @@ -22,12 +22,12 @@ #include <raul/SharedPtr.hpp> #include <raul/Deletable.hpp> #include "types.hpp" -#include "ThreadManager.hpp" namespace Ingen { class Engine; class Responder; +class ProcessContext; /** Base class for all events (both realtime and QueuedEvent). @@ -47,27 +47,13 @@ public: virtual ~Event() {} /** Execute this event in the audio thread (MUST be realtime safe). */ - virtual void execute(SampleCount nframes, FrameTime start, FrameTime end) - { - assert(ThreadManager::current_thread_id() == THREAD_PROCESS); - assert(!_executed); - assert(_time <= end); - - // Missed the event, jitter, damnit. - if (_time < start) - _time = start; - - _executed = true; - } + virtual void execute(ProcessContext& context); /** Perform any actions after execution (ie send replies to commands) * (no realtime requirements). */ - virtual void post_process() - { - assert(ThreadManager::current_thread_id() == THREAD_POST_PROCESS); - } + virtual void post_process(); - inline SampleCount time() { return _time; } + inline SampleCount time() const { return _time; } protected: Event(Engine& engine, SharedPtr<Responder> responder, FrameTime time) |