summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-11-27 01:13:53 +0000
committerDavid Robillard <d@drobilla.net>2008-11-27 01:13:53 +0000
commit9b9a6c9e3eb8da7eb1decd963a6c2f0e69b57ed4 (patch)
tree493656f51b1a68ac10430f5aa8100b4736880950 /src
parent46611da7c351532d99db29e84ad288c1ae26dfa4 (diff)
downloadingen-9b9a6c9e3eb8da7eb1decd963a6c2f0e69b57ed4.tar.gz
ingen-9b9a6c9e3eb8da7eb1decd963a6c2f0e69b57ed4.tar.bz2
ingen-9b9a6c9e3eb8da7eb1decd963a6c2f0e69b57ed4.zip
Fix 'control change for unknown port' message on patch loading.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1783 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/engine/PostProcessor.cpp23
-rw-r--r--src/engine/events/CreateNodeEvent.cpp16
2 files changed, 23 insertions, 16 deletions
diff --git a/src/engine/PostProcessor.cpp b/src/engine/PostProcessor.cpp
index 9a8b540a..23b841ca 100644
--- a/src/engine/PostProcessor.cpp
+++ b/src/engine/PostProcessor.cpp
@@ -46,16 +46,14 @@ PostProcessor::process()
{
const FrameTime end_time = _max_time.get();
- /* Process any audio thread generated events */
+ /* Note the normal (pre-processed client originated) events must
+ * be sent first, since they could have e.g. created a port which
+ * is by now inserted, running, and may broadcast something to
+ * the client. If the broadcast happened first the client would
+ * not yet know about the port's existance. */
+
/* FIXME: process events from all threads if parallel */
- while (_engine.audio_driver()->context().event_sink().read(
- _event_buffer_size, _event_buffer)) {
- if (((Event*)_event_buffer)->time() > end_time)
- break; // FIXME: loses event?
- ((Event*)_event_buffer)->post_process();
- }
-
/* Process normal events */
Raul::List<Event*>::Node* n = _events.head();
while (n) {
@@ -68,6 +66,15 @@ PostProcessor::process()
delete n;
n = next;
}
+
+ /* Process audio thread generated events */
+ while (_engine.audio_driver()->context().event_sink().read(
+ _event_buffer_size, _event_buffer)) {
+ if (((Event*)_event_buffer)->time() > end_time)
+ break; // FIXME: loses event?
+ ((Event*)_event_buffer)->post_process();
+ }
+
}
diff --git a/src/engine/events/CreateNodeEvent.cpp b/src/engine/events/CreateNodeEvent.cpp
index 29f7f96e..d88afb89 100644
--- a/src/engine/events/CreateNodeEvent.cpp
+++ b/src/engine/events/CreateNodeEvent.cpp
@@ -38,14 +38,14 @@ namespace Ingen {
CreateNodeEvent::CreateNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path,
const string& plugin_uri, bool polyphonic)
-: QueuedEvent(engine, responder, timestamp),
- _path(path),
- _plugin_uri(plugin_uri),
- _polyphonic(polyphonic),
- _patch(NULL),
- _node(NULL),
- _compiled_patch(NULL),
- _node_already_exists(false)
+ : QueuedEvent(engine, responder, timestamp)
+ , _path(path)
+ , _plugin_uri(plugin_uri)
+ , _polyphonic(polyphonic)
+ , _patch(NULL)
+ , _node(NULL)
+ , _compiled_patch(NULL)
+ , _node_already_exists(false)
{
}