diff options
author | David Robillard <d@drobilla.net> | 2007-07-03 04:42:41 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-07-03 04:42:41 +0000 |
commit | 0a4dfb16428463d10d12a821afaed866a701550d (patch) | |
tree | 7505ff69fa98bea30fd16b8c90a02e77aa1f7b54 /src/libs/engine/events | |
parent | 06548d893646764cbda3bef2f440b953b1716ae5 (diff) | |
download | ingen-0a4dfb16428463d10d12a821afaed866a701550d.tar.gz ingen-0a4dfb16428463d10d12a821afaed866a701550d.tar.bz2 ingen-0a4dfb16428463d10d12a821afaed866a701550d.zip |
Fix crash on MIDI controller receiving.
Fixed various plugin loading related bugs.
Fix strange liblo bug.. maybe..
Little bit of preliminary LV2 GUI stuff.
git-svn-id: http://svn.drobilla.net/lad/ingen@561 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events')
-rw-r--r-- | src/libs/engine/events/LoadPluginsEvent.cpp | 15 | ||||
-rw-r--r-- | src/libs/engine/events/LoadPluginsEvent.h | 8 |
2 files changed, 11 insertions, 12 deletions
diff --git a/src/libs/engine/events/LoadPluginsEvent.cpp b/src/libs/engine/events/LoadPluginsEvent.cpp index a126e3b2..b06d1817 100644 --- a/src/libs/engine/events/LoadPluginsEvent.cpp +++ b/src/libs/engine/events/LoadPluginsEvent.cpp @@ -20,6 +20,7 @@ #include "Engine.h" #include "NodeFactory.h" #include "ClientBroadcaster.h" +#include "QueuedEventSource.h" #include <iostream> using std::cerr; @@ -27,9 +28,10 @@ using std::cerr; namespace Ingen { -LoadPluginsEvent::LoadPluginsEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp) -: QueuedEvent(engine, responder, timestamp) +LoadPluginsEvent::LoadPluginsEvent(Engine& engine, SharedPtr<Shared::Responder> 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.. */ } void @@ -37,18 +39,15 @@ LoadPluginsEvent::pre_process() { _engine.node_factory()->load_plugins(); - // FIXME: send the changes (added and removed plugins) instead of the entire list each time - - // Take a copy to send in the post processing thread (to avoid problems - // because std::list isn't thread safe) - _plugins = _engine.node_factory()->plugins(); - QueuedEvent::pre_process(); } void LoadPluginsEvent::post_process() { + if (_source) + _source->unblock(); + _responder->respond_ok(); } diff --git a/src/libs/engine/events/LoadPluginsEvent.h b/src/libs/engine/events/LoadPluginsEvent.h index b6de5e5c..e56de796 100644 --- a/src/libs/engine/events/LoadPluginsEvent.h +++ b/src/libs/engine/events/LoadPluginsEvent.h @@ -33,13 +33,13 @@ class Plugin; class LoadPluginsEvent : public QueuedEvent { public: - LoadPluginsEvent(Engine& engine, SharedPtr<Shared::Responder> responder, SampleCount timestamp); + LoadPluginsEvent(Engine& engine, + SharedPtr<Shared::Responder> responder, + SampleCount timestamp, + QueuedEventSource* source); void pre_process(); void post_process(); - -private: - std::list<Plugin*> _plugins; }; |