From 49d6f5b2cc495052d6c5ddbb0629e178c9a2cc14 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 19 Sep 2007 02:46:47 +0000 Subject: More work on dynamic polyphony. git-svn-id: http://svn.drobilla.net/lad/ingen@721 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/events/AddPortEvent.cpp | 6 +++--- src/libs/engine/events/ClearPatchEvent.cpp | 2 +- src/libs/engine/events/DestroyEvent.cpp | 6 +++--- src/libs/engine/events/LoadPluginsEvent.cpp | 2 +- src/libs/engine/events/Makefile.am | 4 ++++ 5 files changed, 12 insertions(+), 8 deletions(-) (limited to 'src/libs/engine/events') diff --git a/src/libs/engine/events/AddPortEvent.cpp b/src/libs/engine/events/AddPortEvent.cpp index 1d016c5d..28273815 100644 --- a/src/libs/engine/events/AddPortEvent.cpp +++ b/src/libs/engine/events/AddPortEvent.cpp @@ -154,15 +154,15 @@ AddPortEvent::execute(SampleCount nframes, FrameTime start, FrameTime end) _engine.midi_driver()->add_port(_driver_port); else if (_type == "ingen:osc") cerr << "OSC DRIVER PORT" << endl; + + if (_source) + _source->unblock(); } void AddPortEvent::post_process() { - if (_source) - _source->unblock(); - if (!_patch_port) { const string msg = string("Could not create port - ").append(_path); _responder->respond_error(msg); diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp index 5a914901..aa72cd54 100644 --- a/src/libs/engine/events/ClearPatchEvent.cpp +++ b/src/libs/engine/events/ClearPatchEvent.cpp @@ -113,7 +113,7 @@ ClearPatchEvent::post_process() _responder->respond_error(string("Patch ") + _patch_path + " not found"); } - _source->unblock(); + _source->unblock(); // FIXME: can be done earlier in execute? } diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp index ba4da6ec..38a8fe3e 100644 --- a/src/libs/engine/events/DestroyEvent.cpp +++ b/src/libs/engine/events/DestroyEvent.cpp @@ -192,15 +192,15 @@ DestroyEvent::execute(SampleCount nframes, FrameTime start, FrameTime end) _driver_port = _engine.midi_driver()->remove_port(_port->path()); } } + + if (_source) + _source->unblock(); } void DestroyEvent::post_process() { - if (_source) - _source->unblock(); - if (_store_iterator != _engine.object_store()->objects().end()) { _engine.broadcaster()->send_destroyed(_path); } else { diff --git a/src/libs/engine/events/LoadPluginsEvent.cpp b/src/libs/engine/events/LoadPluginsEvent.cpp index 2eae055a..df5ff5d9 100644 --- a/src/libs/engine/events/LoadPluginsEvent.cpp +++ b/src/libs/engine/events/LoadPluginsEvent.cpp @@ -31,7 +31,7 @@ namespace Ingen { LoadPluginsEvent::LoadPluginsEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, QueuedEventSource* source) : QueuedEvent(engine, responder, timestamp, true, source) { - /* Not sure why this has to be blocking, but it fixes some nasty bugs.. */ + /* FIXME: Not sure why this has to be blocking, but it fixes some nasty bugs.. */ } void diff --git a/src/libs/engine/events/Makefile.am b/src/libs/engine/events/Makefile.am index bc698678..f3190756 100644 --- a/src/libs/engine/events/Makefile.am +++ b/src/libs/engine/events/Makefile.am @@ -60,6 +60,10 @@ EXTRA_DIST = \ RequestPortValueEvent.hpp \ SetMetadataEvent.cpp \ SetMetadataEvent.hpp \ + SetPolyphonyEvent.hpp \ + SetPolyphonyEvent.cpp \ + SetPolyphonicEvent.hpp \ + SetPolyphonicEvent.cpp \ SetPortValueEvent.cpp \ SetPortValueEvent.hpp \ SetPortValueQueuedEvent.cpp \ -- cgit v1.2.1