summaryrefslogtreecommitdiffstats
path: root/src/engine/ProcessContext.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-24 23:54:37 +0000
committerDavid Robillard <d@drobilla.net>2010-02-24 23:54:37 +0000
commitc35f3f773e68c0e787a8436393475d3269c421c9 (patch)
treefb3847a90d94394f7ff22b3fad1ccb5c0f0da546 /src/engine/ProcessContext.hpp
parent313af960a340f8539214d53252e3186fe3dc8f40 (diff)
downloadingen-c35f3f773e68c0e787a8436393475d3269c421c9.tar.gz
ingen-c35f3f773e68c0e787a8436393475d3269c421c9.tar.bz2
ingen-c35f3f773e68c0e787a8436393475d3269c421c9.zip
Tidy up Context and ProcessContext interfaces (ProcessContext only lives on as a useful type).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2487 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/ProcessContext.hpp')
-rw-r--r--src/engine/ProcessContext.hpp23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/engine/ProcessContext.hpp b/src/engine/ProcessContext.hpp
index fa8e3910..663fea78 100644
--- a/src/engine/ProcessContext.hpp
+++ b/src/engine/ProcessContext.hpp
@@ -25,30 +25,19 @@
namespace Ingen {
-/** Context of a process() call.
+/** Context of a process() call (the audio context).
*
- * This is used to pass whatever information a GraphObject might need to
- * process in the audio thread, e.g. the available thread pool, sink for
- * events (generated in the audio thread, not user initiated events), etc.
- *
- * Note the distinction between nframes and start/end. If transport speed
- * != 1.0, end-start != nframes (though currently that is never the case, it
- * may be in the future with sequencerey things).
+ * This class currently adds no functionality to Context, but the
+ * separate type is useful for writing functions that must only
+ * be run in the audio context (the function taking a ProcessContext
+ * parameter makes this clear, and makes breaking the rules obvious).
*
* \ingroup engine
*/
class ProcessContext : public Context
{
public:
- ProcessContext(Engine& engine)
- : Context(engine, AUDIO)
- {}
-
- void set_time_slice(SampleCount nframes, SampleCount offset, FrameTime start, FrameTime end) {
- locate(start, offset);
- _nframes = nframes;
- _end = end;
- }
+ ProcessContext(Engine& engine) : Context(engine, AUDIO) {}
};