From c35f3f773e68c0e787a8436393475d3269c421c9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 24 Feb 2010 23:54:37 +0000 Subject: 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 --- src/engine/ProcessContext.hpp | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'src/engine/ProcessContext.hpp') 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) {} }; -- cgit v1.2.1