diff options
author | David Robillard <d@drobilla.net> | 2007-01-06 19:39:56 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-01-06 19:39:56 +0000 |
commit | 69c5e7fe16b7d9d08db81a6d5e2762f0be3b081f (patch) | |
tree | 68fd1ea83beedaaaa97846ed09240a3585b2d931 /src/libs/engine/events/DestroyEvent.cpp | |
parent | 2122a857662203936a04a39df7d0e1ad1db82853 (diff) | |
download | ingen-69c5e7fe16b7d9d08db81a6d5e2762f0be3b081f.tar.gz ingen-69c5e7fe16b7d9d08db81a6d5e2762f0be3b081f.tar.bz2 ingen-69c5e7fe16b7d9d08db81a6d5e2762f0be3b081f.zip |
Added ability to get Raul Thread for current calling context.
Strong threading assertions.
Flowcanvas port removal fixes.
Patch port destruction.
Code cleanups, bug fixes.
git-svn-id: http://svn.drobilla.net/lad/ingen@234 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events/DestroyEvent.cpp')
-rw-r--r-- | src/libs/engine/events/DestroyEvent.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp index 9801f0fe..26902697 100644 --- a/src/libs/engine/events/DestroyEvent.cpp +++ b/src/libs/engine/events/DestroyEvent.cpp @@ -43,6 +43,7 @@ DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, Frame _patch_node_listnode(NULL), _patch_port_listnode(NULL), _store_treenode(NULL), + _ports_array(NULL), _process_order(NULL), _disconnect_node_event(NULL), _disconnect_port_event(NULL) @@ -60,6 +61,7 @@ DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, Frame _patch_node_listnode(NULL), _patch_port_listnode(NULL), _store_treenode(NULL), + _ports_array(NULL), _process_order(NULL), _disconnect_node_event(NULL), _disconnect_port_event(NULL) @@ -131,11 +133,8 @@ DestroyEvent::pre_process() if (_port->parent_patch()->enabled()) { // FIXME: is this called multiple times? _process_order = _port->parent_patch()->build_process_order(); - // Remove port to be removed from the process order so it isn't executed by - // Patch::run and can safely be destroyed - //for (size_t i=0; i < _process_order->size(); ++i) - // if (_process_order->at(i) == _port) - // _process_order->at(i) = NULL; // ew, gap + _ports_array = _port->parent_patch()->build_ports_array(); + assert(_ports_array->size() == _port->parent_patch()->num_ports()); } } @@ -168,7 +167,13 @@ DestroyEvent::execute(SampleCount nframes, FrameTime start, FrameTime end) if (_port->parent_patch()->process_order() != NULL) _engine.maid()->push(_port->parent_patch()->process_order()); + _port->parent_patch()->process_order(_process_order); + + if (_port->parent_patch()->external_ports() != NULL) + _engine.maid()->push(_port->parent_patch()->external_ports()); + + _port->parent_patch()->external_ports(_ports_array); } } |