From c0af61632938f161dd2e15dec3c5260a3d5427ca Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 29 Sep 2007 21:39:53 +0000 Subject: Work towards port monitoring and better (higher utilization) parallel execution. git-svn-id: http://svn.drobilla.net/lad/ingen@784 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/ProcessSlave.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/libs/engine/ProcessSlave.hpp') diff --git a/src/libs/engine/ProcessSlave.hpp b/src/libs/engine/ProcessSlave.hpp index a5d2d9cc..c341fe64 100644 --- a/src/libs/engine/ProcessSlave.hpp +++ b/src/libs/engine/ProcessSlave.hpp @@ -24,6 +24,7 @@ #include #include #include +#include "ProcessContext.hpp" #include "types.hpp" namespace Ingen { @@ -35,7 +36,7 @@ class CompiledPatch; class ProcessSlave : protected Raul::Slave { public: ProcessSlave(bool realtime) - : _id(_next_id++), _state(STATE_FINISHED), _index(0), _compiled_patch(NULL) + : _id(_next_id++), _index(0), _state(STATE_FINISHED), _compiled_patch(NULL) { std::stringstream ss; ss << "Process Slave "; @@ -55,12 +56,13 @@ public: inline void whip(CompiledPatch* compiled_patch, size_t start_index, SampleCount nframes, FrameTime start, FrameTime end) { assert(_state == STATE_FINISHED); + _index = start_index; + _state = STATE_RUNNING; _nframes = nframes; _start = start; _end = end; - _index = start_index; _compiled_patch = compiled_patch; - _state = STATE_RUNNING; + Raul::Slave::whip(); } @@ -82,12 +84,13 @@ private: static const int STATE_FINISHED = 2; size_t _id; + size_t _index; Raul::AtomicInt _state; SampleCount _nframes; FrameTime _start; FrameTime _end; - size_t _index; CompiledPatch* _compiled_patch; + ProcessContext _process_context; }; -- cgit v1.2.1