diff options
Diffstat (limited to 'src/engine/ProcessContext.hpp')
-rw-r--r-- | src/engine/ProcessContext.hpp | 26 |
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 - |