diff options
author | David Robillard <d@drobilla.net> | 2006-09-08 03:58:00 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-09-08 03:58:00 +0000 |
commit | 48f87f1f1649fb7e169fdaac2cd38370e8a4a1fa (patch) | |
tree | 9da4b4b075791ac1ec78b499dbcbec6101f54690 /src/libs/engine/QueuedEvent.h | |
parent | acbe9a26ec3ab689e430225d15e95e73a7378aa9 (diff) | |
download | ingen-48f87f1f1649fb7e169fdaac2cd38370e8a4a1fa.tar.gz ingen-48f87f1f1649fb7e169fdaac2cd38370e8a4a1fa.tar.bz2 ingen-48f87f1f1649fb7e169fdaac2cd38370e8a4a1fa.zip |
De-singleton-ified Engine
Slight rework of Responder/ClientKey/ClientInterface for Requests
git-svn-id: http://svn.drobilla.net/lad/ingen@119 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/QueuedEvent.h')
-rw-r--r-- | src/libs/engine/QueuedEvent.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/libs/engine/QueuedEvent.h b/src/libs/engine/QueuedEvent.h index d88a247c..388630e7 100644 --- a/src/libs/engine/QueuedEvent.h +++ b/src/libs/engine/QueuedEvent.h @@ -49,9 +49,16 @@ public: _pre_processed = true; } - virtual void execute(SampleCount offset) { + virtual void execute(SampleCount nframes, FrameTime start, FrameTime end) { assert(_pre_processed); - Event::execute(offset); + assert(_time <= end); + + // Didn't prepare in time. QueuedEvents aren't (necessarily) sample accurate + // so just run at the beginning of this cycle + if (_time <= start) + _time = start; + + Event::execute(nframes, start, end); } virtual void post_process() {} @@ -66,17 +73,18 @@ protected: QueuedEvent(const QueuedEvent& copy); QueuedEvent& operator=(const QueuedEvent&); - QueuedEvent(CountedPtr<Responder> responder, - SampleCount timestamp, + QueuedEvent(Engine& engine, + CountedPtr<Responder> responder, + FrameTime time, bool blocking = false, QueuedEventSource* source = NULL) - : Event(responder, timestamp) + : Event(engine, responder, time) , _pre_processed(false), _blocking(blocking), _source(source) {} // NULL event base (for internal events only!) - QueuedEvent() - : Event(NULL, 0) + QueuedEvent(Engine& engine) + : Event(engine, NULL, 0) , _pre_processed(false), _blocking(false), _source(NULL) {} |