summaryrefslogtreecommitdiffstats
path: root/src/engine/ProcessContext.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-16 05:05:32 +0000
committerDavid Robillard <d@drobilla.net>2011-04-16 05:05:32 +0000
commit987710474b824cb92d83ff6fa7a090f50e10756f (patch)
treef9d9ac7d52f046e284e03f9ab2de70b1ab76b97e /src/engine/ProcessContext.hpp
parent2b04af0ab5d18d3116290fab7febac86f41068c9 (diff)
downloadingen-987710474b824cb92d83ff6fa7a090f50e10756f.tar.gz
ingen-987710474b824cb92d83ff6fa7a090f50e10756f.tar.bz2
ingen-987710474b824cb92d83ff6fa7a090f50e10756f.zip
Hide process slave stuff from Engine.hpp.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3151 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/ProcessContext.hpp')
-rw-r--r--src/engine/ProcessContext.hpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/engine/ProcessContext.hpp b/src/engine/ProcessContext.hpp
index e7e8a001..9e43cc3d 100644
--- a/src/engine/ProcessContext.hpp
+++ b/src/engine/ProcessContext.hpp
@@ -1,5 +1,5 @@
/* This file is part of Ingen.
- * Copyright (C) 2007-2009 David Robillard <http://drobilla.net>
+ * Copyright 2007-2011 David Robillard <http://drobilla.net>
*
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
@@ -18,26 +18,33 @@
#ifndef INGEN_ENGINE_PROCESSCONTEXT_HPP
#define INGEN_ENGINE_PROCESSCONTEXT_HPP
-#include "types.hpp"
-#include "EventSink.hpp"
+#include <vector>
+
#include "Context.hpp"
+#include "EventSink.hpp"
+#include "types.hpp"
namespace Ingen {
+class ProcessSlave;
/** Context of a process() call (the audio context).
- *
- * 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:
explicit ProcessContext(Engine& engine) : Context(engine, AUDIO) {}
+
+ typedef std::vector<ProcessSlave*> Slaves;
+
+ const Slaves& slaves() const { return _slaves; }
+ Slaves& slaves() { return _slaves; }
+
+ void activate(uint32_t parallelism, bool sched_rt);
+
+private:
+ Slaves _slaves;
};
@@ -45,4 +52,3 @@ public:
} // namespace Ingen
#endif // INGEN_ENGINE_PROCESSCONTEXT_HPP
-