From fca95e5d454d37bd74b98f5bce35cfcbaee86c3f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 9 Sep 2006 14:24:56 +0000 Subject: Drove 'er home! Working monolothic Ingenuity (ie. in-process engine). Countless bugfixes. git-svn-id: http://svn.drobilla.net/lad/ingen@123 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/events/ActivateEvent.cpp | 9 -------- src/libs/engine/events/ActivateEvent.h | 1 - src/libs/engine/events/AddNodeEvent.cpp | 4 ++-- src/libs/engine/events/AddPortEvent.cpp | 2 +- src/libs/engine/events/ClearPatchEvent.cpp | 2 +- src/libs/engine/events/ConnectionEvent.cpp | 2 +- src/libs/engine/events/CreatePatchEvent.cpp | 4 ++-- src/libs/engine/events/DSSIConfigureEvent.cpp | 2 +- src/libs/engine/events/DSSIProgramEvent.cpp | 2 +- src/libs/engine/events/DestroyEvent.cpp | 26 +++++----------------- src/libs/engine/events/DestroyEvent.h | 15 ++++++------- src/libs/engine/events/DisablePatchEvent.cpp | 2 +- src/libs/engine/events/DisconnectNodeEvent.cpp | 2 +- src/libs/engine/events/DisconnectionEvent.cpp | 2 +- src/libs/engine/events/EnablePatchEvent.cpp | 2 +- src/libs/engine/events/LoadPluginsEvent.cpp | 17 ++++++++++++-- src/libs/engine/events/LoadPluginsEvent.h | 7 ++++++ src/libs/engine/events/MidiLearnEvent.cpp | 2 +- src/libs/engine/events/RegisterClientEvent.cpp | 2 +- src/libs/engine/events/RenameEvent.cpp | 2 +- src/libs/engine/events/RequestAllObjectsEvent.cpp | 5 ++--- src/libs/engine/events/RequestMetadataEvent.cpp | 2 +- src/libs/engine/events/RequestPluginsEvent.cpp | 7 +++--- src/libs/engine/events/RequestPortValueEvent.cpp | 2 +- src/libs/engine/events/SetMetadataEvent.cpp | 2 +- src/libs/engine/events/SetPortValueEvent.cpp | 4 ++-- src/libs/engine/events/SetPortValueQueuedEvent.cpp | 8 +++---- src/libs/engine/events/UnregisterClientEvent.cpp | 2 +- 28 files changed, 66 insertions(+), 73 deletions(-) (limited to 'src/libs/engine/events') diff --git a/src/libs/engine/events/ActivateEvent.cpp b/src/libs/engine/events/ActivateEvent.cpp index 9d8162ec..c63c86e1 100644 --- a/src/libs/engine/events/ActivateEvent.cpp +++ b/src/libs/engine/events/ActivateEvent.cpp @@ -24,18 +24,9 @@ namespace Ingen { ActivateEvent::ActivateEvent(Engine& engine, CountedPtr responder, SampleCount timestamp) : QueuedEvent(engine, responder, timestamp) { -} - - -void -ActivateEvent::pre_process() -{ - QueuedEvent::pre_process(); - _engine.activate(); } - void ActivateEvent::post_process() { diff --git a/src/libs/engine/events/ActivateEvent.h b/src/libs/engine/events/ActivateEvent.h index 26ee5b84..696fc0de 100644 --- a/src/libs/engine/events/ActivateEvent.h +++ b/src/libs/engine/events/ActivateEvent.h @@ -31,7 +31,6 @@ class ActivateEvent : public QueuedEvent public: ActivateEvent(Engine& engine, CountedPtr responder, SampleCount timestamp); - void pre_process(); void post_process(); }; diff --git a/src/libs/engine/events/AddNodeEvent.cpp b/src/libs/engine/events/AddNodeEvent.cpp index 5287c7cd..19ff6bf5 100644 --- a/src/libs/engine/events/AddNodeEvent.cpp +++ b/src/libs/engine/events/AddNodeEvent.cpp @@ -117,8 +117,8 @@ AddNodeEvent::post_process() _responder->respond_error(msg); } else { _responder->respond_ok(); - //_engine.client_broadcaster()->send_node_creation_messages(m_node); - _engine.client_broadcaster()->send_node(m_node); + //_engine.broadcaster()->send_node_creation_messages(m_node); + _engine.broadcaster()->send_node(m_node); } } diff --git a/src/libs/engine/events/AddPortEvent.cpp b/src/libs/engine/events/AddPortEvent.cpp index 7b034f43..06ddae94 100644 --- a/src/libs/engine/events/AddPortEvent.cpp +++ b/src/libs/engine/events/AddPortEvent.cpp @@ -126,7 +126,7 @@ AddPortEvent::post_process() _responder->respond_error(msg); } else { _responder->respond_ok(); - _engine.client_broadcaster()->send_port(_patch_port); + _engine.broadcaster()->send_port(_patch_port); } } diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp index e73fd376..3518dc03 100644 --- a/src/libs/engine/events/ClearPatchEvent.cpp +++ b/src/libs/engine/events/ClearPatchEvent.cpp @@ -103,7 +103,7 @@ ClearPatchEvent::post_process() // Reply _responder->respond_ok(); - _engine.client_broadcaster()->send_patch_cleared(m_patch_path); + _engine.broadcaster()->send_patch_cleared(m_patch_path); } else { _responder->respond_error(string("Patch ") + m_patch_path + " not found"); } diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp index b873bccb..7c97de03 100644 --- a/src/libs/engine/events/ConnectionEvent.cpp +++ b/src/libs/engine/events/ConnectionEvent.cpp @@ -250,7 +250,7 @@ TypedConnectionEvent::post_process() _responder->respond_ok(); - _engine.client_broadcaster()->send_connection(m_connection); + _engine.broadcaster()->send_connection(m_connection); } else { _responder->respond_error("Unable to make connection."); } diff --git a/src/libs/engine/events/CreatePatchEvent.cpp b/src/libs/engine/events/CreatePatchEvent.cpp index d66a3ff9..7532291b 100644 --- a/src/libs/engine/events/CreatePatchEvent.cpp +++ b/src/libs/engine/events/CreatePatchEvent.cpp @@ -121,10 +121,10 @@ CreatePatchEvent::post_process() _responder->respond_ok(); // Don't want to send nodes that have been added since prepare() - //_engine.client_broadcaster()->send_node_creation_messages(m_patch); + //_engine.broadcaster()->send_node_creation_messages(m_patch); // Patches are always empty on creation, so this is fine - _engine.client_broadcaster()->send_patch(m_patch); + _engine.broadcaster()->send_patch(m_patch); } else if (m_error == OBJECT_EXISTS) { string msg = "Unable to create patch: "; diff --git a/src/libs/engine/events/DSSIConfigureEvent.cpp b/src/libs/engine/events/DSSIConfigureEvent.cpp index de79a083..fb006444 100644 --- a/src/libs/engine/events/DSSIConfigureEvent.cpp +++ b/src/libs/engine/events/DSSIConfigureEvent.cpp @@ -63,7 +63,7 @@ DSSIConfigureEvent::post_process() } else { string key = "dssi-configure--"; key += m_key; - _engine.client_broadcaster()->send_metadata_update(m_node_path, key, m_val); + _engine.broadcaster()->send_metadata_update(m_node_path, key, m_val); } } diff --git a/src/libs/engine/events/DSSIProgramEvent.cpp b/src/libs/engine/events/DSSIProgramEvent.cpp index 4545268a..d602b57c 100644 --- a/src/libs/engine/events/DSSIProgramEvent.cpp +++ b/src/libs/engine/events/DSSIProgramEvent.cpp @@ -67,7 +67,7 @@ DSSIProgramEvent::post_process() // sends program as metadata in the form bank/program char* temp_buf = new char[16]; snprintf(temp_buf, 16, "%d/%d", m_bank, m_program); - _engine.client_broadcaster()->send_metadata_update(m_node_path, "dssi-program", temp_buf); + _engine.broadcaster()->send_metadata_update(m_node_path, "dssi-program", temp_buf); } } diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp index dd172e7f..ced323a1 100644 --- a/src/libs/engine/events/DestroyEvent.cpp +++ b/src/libs/engine/events/DestroyEvent.cpp @@ -34,16 +34,16 @@ namespace Ingen { -DestroyEvent::DestroyEvent(Engine& engine, CountedPtr responder, SampleCount timestamp, QueuedEventSource* source, const string& path, bool lock_mutex) -: QueuedEvent(engine, responder, true, source), +DestroyEvent::DestroyEvent(Engine& engine, CountedPtr responder, FrameTime time, QueuedEventSource* source, const string& path, bool lock_mutex) +: QueuedEvent(engine, responder, time, true, source), m_path(path), m_node(NULL), m_patch_listnode(NULL), m_store_treenode(NULL), m_process_order(NULL), - m_disconnect_event(NULL), - m_parent_disconnect_event(NULL) + m_disconnect_event(NULL) { + assert(_source); } @@ -54,8 +54,7 @@ DestroyEvent::DestroyEvent(Engine& engine, CountedPtr responder, Samp m_patch_listnode(NULL), m_store_treenode(NULL), m_process_order(NULL), - m_disconnect_event(NULL), - m_parent_disconnect_event(NULL) + m_disconnect_event(NULL) { } @@ -63,7 +62,6 @@ DestroyEvent::DestroyEvent(Engine& engine, CountedPtr responder, Samp DestroyEvent::~DestroyEvent() { delete m_disconnect_event; - delete m_parent_disconnect_event; } @@ -86,14 +84,6 @@ DestroyEvent::pre_process() m_disconnect_event->pre_process(); } - // Create a recursive disconnect event for the parent port, if a bridge node - cerr << "FIXME: Destroy bridge\n"; - /*Port* parent_port = m_patch_listnode->elem()->as_port(); - if (parent_port != NULL) { // Bridge node - m_parent_disconnect_event = new DisconnectPortEvent(Engine& engine, parent_port); - m_parent_disconnect_event->pre_process(); - }*/ - if (m_node->parent_patch()->enabled()) { m_process_order = m_node->parent_patch()->build_process_order(); // Remove node to be removed from the process order so it isn't executed by @@ -125,8 +115,6 @@ DestroyEvent::execute(SampleCount nframes, FrameTime start, FrameTime end) if (m_disconnect_event != NULL) m_disconnect_event->execute(nframes, start, end); - if (m_parent_disconnect_event != NULL) - m_parent_disconnect_event->execute(nframes, start, end); if (m_node->parent_patch()->process_order() != NULL) _engine.maid()->push(m_node->parent_patch()->process_order()); @@ -151,9 +139,7 @@ DestroyEvent::post_process() _responder->respond_ok(); if (m_disconnect_event != NULL) m_disconnect_event->post_process(); - if (m_parent_disconnect_event != NULL) - m_parent_disconnect_event->post_process(); - _engine.client_broadcaster()->send_destroyed(m_path); + _engine.broadcaster()->send_destroyed(m_path); _engine.maid()->push(m_patch_listnode); _engine.maid()->push(m_node); } else { diff --git a/src/libs/engine/events/DestroyEvent.h b/src/libs/engine/events/DestroyEvent.h index 6eda8006..92b1c194 100644 --- a/src/libs/engine/events/DestroyEvent.h +++ b/src/libs/engine/events/DestroyEvent.h @@ -44,8 +44,8 @@ class DisconnectPortEvent; class DestroyEvent : public QueuedEvent { public: - DestroyEvent(Engine& engine, CountedPtr responder, SampleCount timestamp, QueuedEventSource* source, const string& path, bool lock_mutex = true); - DestroyEvent(Engine& engine, CountedPtr responder, SampleCount timestamp, Node* node, bool lock_mutex = true); + DestroyEvent(Engine& engine, CountedPtr responder, FrameTime timestamp, QueuedEventSource* source, const string& path, bool lock_mutex = true); + DestroyEvent(Engine& engine, CountedPtr responder, FrameTime timestamp, Node* node, bool lock_mutex = true); ~DestroyEvent(); void pre_process(); @@ -53,13 +53,12 @@ public: void post_process(); private: - Path m_path; - Node* m_node; - ListNode* m_patch_listnode; + Path m_path; + Node* m_node; + ListNode* m_patch_listnode; TreeNode* m_store_treenode; - Array* m_process_order; // Patch's new process order - DisconnectNodeEvent* m_disconnect_event; - DisconnectPortEvent* m_parent_disconnect_event; // used for input/output nodes + Array* m_process_order; // Patch's new process order + DisconnectNodeEvent* m_disconnect_event; }; diff --git a/src/libs/engine/events/DisablePatchEvent.cpp b/src/libs/engine/events/DisablePatchEvent.cpp index 299e4fdc..064dd9fd 100644 --- a/src/libs/engine/events/DisablePatchEvent.cpp +++ b/src/libs/engine/events/DisablePatchEvent.cpp @@ -58,7 +58,7 @@ DisablePatchEvent::post_process() { if (m_patch != NULL) { _responder->respond_ok(); - _engine.client_broadcaster()->send_patch_disable(m_patch_path); + _engine.broadcaster()->send_patch_disable(m_patch_path); } else { _responder->respond_error(string("Patch ") + m_patch_path + " not found"); } diff --git a/src/libs/engine/events/DisconnectNodeEvent.cpp b/src/libs/engine/events/DisconnectNodeEvent.cpp index c1a965ad..df85e1db 100644 --- a/src/libs/engine/events/DisconnectNodeEvent.cpp +++ b/src/libs/engine/events/DisconnectNodeEvent.cpp @@ -53,7 +53,7 @@ DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, CountedPtr r */ DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, Node* node) : QueuedEvent(engine), - m_node_path(""), + m_node_path(node->path()), m_patch(node->parent_patch()), m_node(node), m_succeeded(true), diff --git a/src/libs/engine/events/DisconnectionEvent.cpp b/src/libs/engine/events/DisconnectionEvent.cpp index c246e9dc..7e050369 100644 --- a/src/libs/engine/events/DisconnectionEvent.cpp +++ b/src/libs/engine/events/DisconnectionEvent.cpp @@ -271,7 +271,7 @@ TypedDisconnectionEvent::post_process() _responder->respond_ok(); - _engine.client_broadcaster()->send_disconnection(m_src_port->path(), m_dst_port->path()); + _engine.broadcaster()->send_disconnection(m_src_port->path(), m_dst_port->path()); } else { _responder->respond_error("Unable to disconnect ports."); } diff --git a/src/libs/engine/events/EnablePatchEvent.cpp b/src/libs/engine/events/EnablePatchEvent.cpp index 132aefcc..01144013 100644 --- a/src/libs/engine/events/EnablePatchEvent.cpp +++ b/src/libs/engine/events/EnablePatchEvent.cpp @@ -70,7 +70,7 @@ EnablePatchEvent::post_process() { if (m_patch != NULL) { _responder->respond_ok(); - _engine.client_broadcaster()->send_patch_enable(m_patch_path); + _engine.broadcaster()->send_patch_enable(m_patch_path); } else { _responder->respond_error(string("Patch ") + m_patch_path + " not found"); } diff --git a/src/libs/engine/events/LoadPluginsEvent.cpp b/src/libs/engine/events/LoadPluginsEvent.cpp index 6962387b..daf61378 100644 --- a/src/libs/engine/events/LoadPluginsEvent.cpp +++ b/src/libs/engine/events/LoadPluginsEvent.cpp @@ -18,6 +18,7 @@ #include "Responder.h" #include "Engine.h" #include "NodeFactory.h" +#include "ClientBroadcaster.h" #include using std::cerr; @@ -28,10 +29,22 @@ namespace Ingen { LoadPluginsEvent::LoadPluginsEvent(Engine& engine, CountedPtr responder, SampleCount timestamp) : QueuedEvent(engine, responder, timestamp) { - cerr << "LOADING PLUGINS\n"; - _engine.node_factory()->load_plugins(); } +void +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(); + cerr << "loaded " << _plugins.size() << "plugins.\n"; + + QueuedEvent::pre_process(); +} void LoadPluginsEvent::post_process() diff --git a/src/libs/engine/events/LoadPluginsEvent.h b/src/libs/engine/events/LoadPluginsEvent.h index ae784e3a..a143d812 100644 --- a/src/libs/engine/events/LoadPluginsEvent.h +++ b/src/libs/engine/events/LoadPluginsEvent.h @@ -17,10 +17,13 @@ #ifndef LOADPLUGINSEVENT_H #define LOADPLUGINSEVENT_H +#include #include "QueuedEvent.h" namespace Ingen { +class Plugin; + /** Loads all plugins into the internal plugin database (in NodeFactory). * @@ -31,7 +34,11 @@ class LoadPluginsEvent : public QueuedEvent public: LoadPluginsEvent(Engine& engine, CountedPtr responder, SampleCount timestamp); + void pre_process(); void post_process(); + +private: + std::list _plugins; }; diff --git a/src/libs/engine/events/MidiLearnEvent.cpp b/src/libs/engine/events/MidiLearnEvent.cpp index 822573e0..c56db8d8 100644 --- a/src/libs/engine/events/MidiLearnEvent.cpp +++ b/src/libs/engine/events/MidiLearnEvent.cpp @@ -30,7 +30,7 @@ namespace Ingen { void MidiLearnResponseEvent::post_process() { - _engine.client_broadcaster()->send_control_change(m_port_path, m_value); + _engine.broadcaster()->send_control_change(m_port_path, m_value); } diff --git a/src/libs/engine/events/RegisterClientEvent.cpp b/src/libs/engine/events/RegisterClientEvent.cpp index e35b7fdb..81cb3b81 100644 --- a/src/libs/engine/events/RegisterClientEvent.cpp +++ b/src/libs/engine/events/RegisterClientEvent.cpp @@ -36,7 +36,7 @@ RegisterClientEvent::RegisterClientEvent(Engine& engine, CountedPtr void RegisterClientEvent::pre_process() { - _engine.client_broadcaster()->register_client(_key, _client); + _engine.broadcaster()->register_client(_key, _client); QueuedEvent::pre_process(); } diff --git a/src/libs/engine/events/RenameEvent.cpp b/src/libs/engine/events/RenameEvent.cpp index 465f4946..82fe3737 100644 --- a/src/libs/engine/events/RenameEvent.cpp +++ b/src/libs/engine/events/RenameEvent.cpp @@ -103,7 +103,7 @@ RenameEvent::post_process() if (m_error == NO_ERROR) { _responder->respond_ok(); - _engine.client_broadcaster()->send_rename(m_old_path, m_new_path); + _engine.broadcaster()->send_rename(m_old_path, m_new_path); } else { if (m_error == OBJECT_EXISTS) msg.append("Object already exists at ").append(m_new_path); diff --git a/src/libs/engine/events/RequestAllObjectsEvent.cpp b/src/libs/engine/events/RequestAllObjectsEvent.cpp index 5eb780b3..f51a514e 100644 --- a/src/libs/engine/events/RequestAllObjectsEvent.cpp +++ b/src/libs/engine/events/RequestAllObjectsEvent.cpp @@ -25,8 +25,7 @@ namespace Ingen { RequestAllObjectsEvent::RequestAllObjectsEvent(Engine& engine, CountedPtr responder, SampleCount timestamp) -: QueuedEvent(engine, responder, timestamp), - m_client(CountedPtr(NULL)) +: QueuedEvent(engine, responder, timestamp) { } @@ -34,7 +33,7 @@ RequestAllObjectsEvent::RequestAllObjectsEvent(Engine& engine, CountedPtrclient(_responder->client_key()); + m_client = _engine.broadcaster()->client(_responder->client_key()); QueuedEvent::pre_process(); } diff --git a/src/libs/engine/events/RequestMetadataEvent.cpp b/src/libs/engine/events/RequestMetadataEvent.cpp index 03d84d7f..e2169f54 100644 --- a/src/libs/engine/events/RequestMetadataEvent.cpp +++ b/src/libs/engine/events/RequestMetadataEvent.cpp @@ -41,7 +41,7 @@ RequestMetadataEvent::RequestMetadataEvent(Engine& engine, CountedPtr void RequestMetadataEvent::pre_process() { - m_client = _engine.client_broadcaster()->client(_responder->client_key()); + m_client = _engine.broadcaster()->client(_responder->client_key()); if (m_client) { m_object = _engine.object_store()->find(m_path); diff --git a/src/libs/engine/events/RequestPluginsEvent.cpp b/src/libs/engine/events/RequestPluginsEvent.cpp index 9efb2388..789be0ea 100644 --- a/src/libs/engine/events/RequestPluginsEvent.cpp +++ b/src/libs/engine/events/RequestPluginsEvent.cpp @@ -24,8 +24,7 @@ namespace Ingen { RequestPluginsEvent::RequestPluginsEvent(Engine& engine, CountedPtr responder, SampleCount timestamp) -: QueuedEvent(engine, responder, timestamp), - m_client(CountedPtr(NULL)) +: QueuedEvent(engine, responder, timestamp) { } @@ -33,7 +32,7 @@ RequestPluginsEvent::RequestPluginsEvent(Engine& engine, CountedPtr r void RequestPluginsEvent::pre_process() { - m_client = _engine.client_broadcaster()->client(_responder->client_key()); + m_client = _engine.broadcaster()->client(_responder->client_key()); // Take a copy to send in the post processing thread (to avoid problems // because std::list isn't thread safe) @@ -47,7 +46,7 @@ void RequestPluginsEvent::post_process() { if (m_client) { - _engine.client_broadcaster()->send_plugins_to(m_client.get(), m_plugins); + _engine.broadcaster()->send_plugins_to(m_client, m_plugins); _responder->respond_ok(); } else { _responder->respond_error("Unable to find client to send plugins"); diff --git a/src/libs/engine/events/RequestPortValueEvent.cpp b/src/libs/engine/events/RequestPortValueEvent.cpp index 830ef852..12dea975 100644 --- a/src/libs/engine/events/RequestPortValueEvent.cpp +++ b/src/libs/engine/events/RequestPortValueEvent.cpp @@ -41,7 +41,7 @@ RequestPortValueEvent::RequestPortValueEvent(Engine& engine, CountedPtrclient(_responder->client_key()); + m_client = _engine.broadcaster()->client(_responder->client_key()); m_port = _engine.object_store()->find_port(m_port_path); QueuedEvent::pre_process(); diff --git a/src/libs/engine/events/SetMetadataEvent.cpp b/src/libs/engine/events/SetMetadataEvent.cpp index 1ce5d6f4..428437e3 100644 --- a/src/libs/engine/events/SetMetadataEvent.cpp +++ b/src/libs/engine/events/SetMetadataEvent.cpp @@ -70,7 +70,7 @@ SetMetadataEvent::post_process() _responder->respond_error(msg); } else { _responder->respond_ok(); - _engine.client_broadcaster()->send_metadata_update(m_path, m_key, m_value); + _engine.broadcaster()->send_metadata_update(m_path, m_key, m_value); } } diff --git a/src/libs/engine/events/SetPortValueEvent.cpp b/src/libs/engine/events/SetPortValueEvent.cpp index 4018139a..efe53b37 100644 --- a/src/libs/engine/events/SetPortValueEvent.cpp +++ b/src/libs/engine/events/SetPortValueEvent.cpp @@ -78,13 +78,13 @@ SetPortValueEvent::post_process() assert(m_port != NULL); _responder->respond_ok(); - _engine.client_broadcaster()->send_control_change(m_port_path, m_val); + _engine.broadcaster()->send_control_change(m_port_path, m_val); // Send patch port control change, if this is a bridge port /*Port* parent_port = m_port->parent_node()->as_port(); if (parent_port != NULL) { assert(parent_port->type() == DataType::FLOAT); - _engine.client_broadcaster()->send_control_change(parent_port->path(), m_val); + _engine.broadcaster()->send_control_change(parent_port->path(), m_val); }*/ } else if (m_error == PORT_NOT_FOUND) { diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.cpp b/src/libs/engine/events/SetPortValueQueuedEvent.cpp index caee68a6..dcbec0be 100644 --- a/src/libs/engine/events/SetPortValueQueuedEvent.cpp +++ b/src/libs/engine/events/SetPortValueQueuedEvent.cpp @@ -69,9 +69,9 @@ SetPortValueQueuedEvent::pre_process() void SetPortValueQueuedEvent::execute(SampleCount nframes, FrameTime start, FrameTime end) { - assert(_time >= start && _time <= end); - QueuedEvent::execute(nframes, start, end); + + assert(_time >= start && _time <= end); if (m_error == NO_ERROR) { assert(m_port != NULL); @@ -90,13 +90,13 @@ SetPortValueQueuedEvent::post_process() assert(m_port != NULL); _responder->respond_ok(); - _engine.client_broadcaster()->send_control_change(m_port_path, m_val); + _engine.broadcaster()->send_control_change(m_port_path, m_val); // Send patch port control change, if this is a bridge port /*Port* parent_port = m_port->parent_node()->as_port(); if (parent_port != NULL) { assert(parent_port->type() == DataType::FLOAT); - _engine.client_broadcaster()->send_control_change(parent_port->path(), m_val); + _engine.broadcaster()->send_control_change(parent_port->path(), m_val); }*/ } else if (m_error == PORT_NOT_FOUND) { diff --git a/src/libs/engine/events/UnregisterClientEvent.cpp b/src/libs/engine/events/UnregisterClientEvent.cpp index 13709959..310df7c5 100644 --- a/src/libs/engine/events/UnregisterClientEvent.cpp +++ b/src/libs/engine/events/UnregisterClientEvent.cpp @@ -33,7 +33,7 @@ UnregisterClientEvent::UnregisterClientEvent(Engine& engine, CountedPtrunregister_client(_key)) + if (_engine.broadcaster()->unregister_client(_key)) _responder->respond_ok(); else _responder->respond_error("Unable to unregister client"); -- cgit v1.2.1