summaryrefslogtreecommitdiffstats
path: root/src/engine/Context.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-24 23:12:34 +0000
committerDavid Robillard <d@drobilla.net>2010-02-24 23:12:34 +0000
commite853d3dfcf450f6160e19f20b6b67e251c906169 (patch)
tree6b62d2d1a7f3a047f141e58caee4e5e71ac1f4de /src/engine/Context.hpp
parent784dc03a78dc338b45111ebdca45371dfaaa6fa9 (diff)
downloadingen-e853d3dfcf450f6160e19f20b6b67e251c906169.tar.gz
ingen-e853d3dfcf450f6160e19f20b6b67e251c906169.tar.bz2
ingen-e853d3dfcf450f6160e19f20b6b67e251c906169.zip
Add new Delay internal.
Preliminary work towards split cycles. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2485 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/Context.hpp')
-rw-r--r--src/engine/Context.hpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/engine/Context.hpp b/src/engine/Context.hpp
index e0bc924e..a30706da 100644
--- a/src/engine/Context.hpp
+++ b/src/engine/Context.hpp
@@ -38,6 +38,9 @@ public:
, _engine(engine)
, _event_sink(engine, event_queue_size)
, _start(0)
+ , _nframes(0)
+ , _end(0)
+ , _offset(0)
, _realtime(true)
{}
@@ -45,11 +48,14 @@ public:
ID id() const { return _id; }
- void locate(FrameTime s) { _start = s; }
+ void locate(FrameTime s, SampleCount o=0) { _start = s; _offset=o; }
- inline Engine& engine() const { return _engine; }
- inline FrameTime start() const { return _start; }
- inline bool realtime() const { return _realtime; }
+ inline Engine& engine() const { return _engine; }
+ inline FrameTime start() const { return _start; }
+ inline SampleCount nframes() const { return _nframes; }
+ inline FrameTime end() const { return _end; }
+ inline SampleCount offset() const { return _offset; }
+ inline bool realtime() const { return _realtime; }
inline const EventSink& event_sink() const { return _event_sink; }
inline EventSink& event_sink() { return _event_sink; }
@@ -58,10 +64,12 @@ protected:
ID _id; ///< Fast ID for this context
Engine& _engine; ///< Engine we're running in
-private:
- EventSink _event_sink; ///< Sink for events generated in a realtime context
- FrameTime _start; ///< Start frame of this cycle, timeline relative
- bool _realtime; ///< True iff context is hard realtime
+ EventSink _event_sink; ///< Sink for events generated in a realtime context
+ FrameTime _start; ///< Start frame of this cycle, timeline relative
+ SampleCount _nframes; ///< Length of this cycle in frames
+ FrameTime _end; ///< End frame of this cycle, timeline relative
+ SampleCount _offset; ///< Start offset relative to start of driver buffers
+ bool _realtime; ///< True iff context is hard realtime
};