diff options
author | David Robillard <d@drobilla.net> | 2007-09-29 21:39:53 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-09-29 21:39:53 +0000 |
commit | c0af61632938f161dd2e15dec3c5260a3d5427ca (patch) | |
tree | 950bcfc1bc1fb232f8244c42504b8da3d5b511f5 /src/libs/engine/ProcessSlave.hpp | |
parent | 85923e8b4f9f1601f008a9120d376d944f2478a2 (diff) | |
download | ingen-c0af61632938f161dd2e15dec3c5260a3d5427ca.tar.gz ingen-c0af61632938f161dd2e15dec3c5260a3d5427ca.tar.bz2 ingen-c0af61632938f161dd2e15dec3c5260a3d5427ca.zip |
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
Diffstat (limited to 'src/libs/engine/ProcessSlave.hpp')
-rw-r--r-- | src/libs/engine/ProcessSlave.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
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 <raul/Slave.hpp> #include <raul/Array.hpp> #include <raul/AtomicInt.hpp> +#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; }; |