diff options
author | David Robillard <d@drobilla.net> | 2008-10-12 18:03:27 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-10-12 18:03:27 +0000 |
commit | 544851bda4a85a97b1f1e3a229ccd21b00a0f3fe (patch) | |
tree | 3d9d8d5fa92a10349e896491b27c075898bfa27b /src/engine/events | |
parent | b4b775fb90913f93646560cef250979a002f1fd1 (diff) | |
download | ingen-544851bda4a85a97b1f1e3a229ccd21b00a0f3fe.tar.gz ingen-544851bda4a85a97b1f1e3a229ccd21b00a0f3fe.tar.bz2 ingen-544851bda4a85a97b1f1e3a229ccd21b00a0f3fe.zip |
More tidy.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1664 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events')
-rw-r--r-- | src/engine/events/CreatePortEvent.cpp | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/src/engine/events/CreatePortEvent.cpp b/src/engine/events/CreatePortEvent.cpp index 30b019e9..6f3f80e5 100644 --- a/src/engine/events/CreatePortEvent.cpp +++ b/src/engine/events/CreatePortEvent.cpp @@ -38,28 +38,28 @@ namespace Ingen { CreatePortEvent::CreatePortEvent(Engine& engine, - SharedPtr<Responder> responder, - SampleCount timestamp, - const string& path, - const string& type, - bool is_output, - QueuedEventSource* source) -: QueuedEvent(engine, responder, timestamp, true, source), - _error(NO_ERROR), - _path(path), - _type(type), - _is_output(is_output), - _data_type(type), - _patch(NULL), - _patch_port(NULL), - _driver_port(NULL) + SharedPtr<Responder> responder, + SampleCount timestamp, + const string& path, + const string& type, + bool is_output, + QueuedEventSource* source) + : QueuedEvent(engine, responder, timestamp, true, source) + , _error(NO_ERROR) + , _path(path) + , _type(type) + , _is_output(is_output) + , _data_type(type) + , _patch(NULL) + , _patch_port(NULL) + , _driver_port(NULL) { /* This is blocking because of the two different sets of Patch ports, the array used in the * audio thread (inherited from NodeBase), and the arrays used in the pre processor thread. * If two add port events arrive in the same cycle and the second pre processes before the * first executes, bad things happen (ports are lost). * - * FIXME: fix this using RCU + * TODO: fix this using RCU? */ if (_data_type == DataType::UNKNOWN) { @@ -77,8 +77,6 @@ CreatePortEvent::pre_process() return; } - // FIXME: this is just a mess :/ - _patch = _engine.engine_store()->find_patch(_path.parent()); if (_patch != NULL) { @@ -104,9 +102,7 @@ CreatePortEvent::pre_process() else _ports_array = new Raul::Array<PortImpl*>(old_num_ports + 1, NULL); - _ports_array->at(_patch->num_ports()-1) = _patch_port; - //_patch_port->add_to_store(_engine.engine_store()); _engine.engine_store()->add(_patch_port); if (!_patch->parent()) { @@ -135,10 +131,7 @@ CreatePortEvent::execute(ProcessContext& context) QueuedEvent::execute(context); if (_patch_port) { - _engine.maid()->push(_patch->external_ports()); - //_patch->add_port(_port); - _patch->external_ports(_ports_array); } |