diff options
author | David Robillard <d@drobilla.net> | 2006-09-10 20:11:40 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-09-10 20:11:40 +0000 |
commit | e772196c07ff58022beaabf5e494be3441d1ba4a (patch) | |
tree | 4a3dc214fb333d9787c666e1b3d239124b94302e /src/libs/engine | |
parent | 8854610aac91caaf6bb8db782cc4c9bd2ca53c52 (diff) | |
download | ingen-e772196c07ff58022beaabf5e494be3441d1ba4a.tar.gz ingen-e772196c07ff58022beaabf5e494be3441d1ba4a.tar.bz2 ingen-e772196c07ff58022beaabf5e494be3441d1ba4a.zip |
Zoom Full feature in FlowCanvas/Ingenuity.
Fix for reattaching to running engine (reponse ID bug).
More GUI work.
git-svn-id: http://svn.drobilla.net/lad/ingen@126 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine')
-rw-r--r-- | src/libs/engine/OSCEngineReceiver.cpp | 7 | ||||
-rw-r--r-- | src/libs/engine/QueuedEngineInterface.cpp | 2 | ||||
-rw-r--r-- | src/libs/engine/QueuedEvent.h | 5 | ||||
-rw-r--r-- | src/libs/engine/events/ClearPatchEvent.cpp | 4 | ||||
-rw-r--r-- | src/libs/engine/events/ClearPatchEvent.h | 2 | ||||
-rw-r--r-- | src/libs/engine/events/DestroyEvent.cpp | 8 | ||||
-rw-r--r-- | src/libs/engine/events/DestroyEvent.h | 4 |
7 files changed, 19 insertions, 13 deletions
diff --git a/src/libs/engine/OSCEngineReceiver.cpp b/src/libs/engine/OSCEngineReceiver.cpp index 84c9f0fe..ad985b7e 100644 --- a/src/libs/engine/OSCEngineReceiver.cpp +++ b/src/libs/engine/OSCEngineReceiver.cpp @@ -66,7 +66,7 @@ OSCEngineReceiver::OSCEngineReceiver(CountedPtr<Engine> engine, size_t queue_siz } // For debugging, print all incoming OSC messages - //lo_server_add_method(_server, NULL, NULL, generic_cb, NULL); + lo_server_add_method(_server, NULL, NULL, generic_cb, NULL); // Set response address for this message. // It's important this is first and returns nonzero. @@ -222,7 +222,7 @@ OSCEngineReceiver::set_response_address_cb(const char* path, const char* types, //cerr << "** osc responder\n"; if (!strcmp(url, me->_osc_responder->url())) { - // Nice one, same address + // Nice one, same address, do nothing (just set the ID below) //cerr << "** Using cached response address, hooray" << endl; } else { // Shitty deal, make a new one @@ -231,6 +231,7 @@ OSCEngineReceiver::set_response_address_cb(const char* path, const char* types, new OSCResponder(me->_engine->broadcaster(), id, url)); me->set_responder(me->_osc_responder); + // (responder takes ownership of url, no leak) } @@ -241,6 +242,8 @@ OSCEngineReceiver::set_response_address_cb(const char* path, const char* types, me->set_responder(me->_osc_responder); //cerr << "** Setting response address to " << url << "(2)" << endl; } + + me->set_next_response_id(id); // Don't respond } else { diff --git a/src/libs/engine/QueuedEngineInterface.cpp b/src/libs/engine/QueuedEngineInterface.cpp index d56b8de1..35e1c99a 100644 --- a/src/libs/engine/QueuedEngineInterface.cpp +++ b/src/libs/engine/QueuedEngineInterface.cpp @@ -189,7 +189,7 @@ QueuedEngineInterface::destroy(const string& path) void QueuedEngineInterface::clear_patch(const string& patch_path) { - push_queued(new ClearPatchEvent(*_engine.get(), _responder, now(), patch_path)); + push_queued(new ClearPatchEvent(*_engine.get(), _responder, now(), this, patch_path)); } diff --git a/src/libs/engine/QueuedEvent.h b/src/libs/engine/QueuedEvent.h index 388630e7..733ebd38 100644 --- a/src/libs/engine/QueuedEvent.h +++ b/src/libs/engine/QueuedEvent.h @@ -80,7 +80,10 @@ protected: QueuedEventSource* source = NULL) : Event(engine, responder, time) , _pre_processed(false), _blocking(blocking), _source(source) - {} + { + if (blocking) + assert(_source); + } // NULL event base (for internal events only!) QueuedEvent(Engine& engine) diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp index b8f31243..5023e89e 100644 --- a/src/libs/engine/events/ClearPatchEvent.cpp +++ b/src/libs/engine/events/ClearPatchEvent.cpp @@ -30,8 +30,8 @@ namespace Ingen { -ClearPatchEvent::ClearPatchEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path) -: QueuedEvent(engine, responder, true), +ClearPatchEvent::ClearPatchEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& patch_path) +: QueuedEvent(engine, responder, time, true, source), m_patch_path(patch_path), m_patch(NULL), m_process(false) diff --git a/src/libs/engine/events/ClearPatchEvent.h b/src/libs/engine/events/ClearPatchEvent.h index 0eb9b495..234b8a51 100644 --- a/src/libs/engine/events/ClearPatchEvent.h +++ b/src/libs/engine/events/ClearPatchEvent.h @@ -35,7 +35,7 @@ class Patch; class ClearPatchEvent : public QueuedEvent { public: - ClearPatchEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path); + ClearPatchEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& patch_path); void pre_process(); void execute(SampleCount nframes, FrameTime start, FrameTime end); diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp index ced323a1..bdf5f679 100644 --- a/src/libs/engine/events/DestroyEvent.cpp +++ b/src/libs/engine/events/DestroyEvent.cpp @@ -34,8 +34,8 @@ namespace Ingen { -DestroyEvent::DestroyEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& path, bool lock_mutex) -: QueuedEvent(engine, responder, time, true, source), +DestroyEvent::DestroyEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& path, bool block) +: QueuedEvent(engine, responder, time, source, source), m_path(path), m_node(NULL), m_patch_listnode(NULL), @@ -47,8 +47,8 @@ DestroyEvent::DestroyEvent(Engine& engine, CountedPtr<Responder> responder, Fram } -DestroyEvent::DestroyEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, Node* node, bool lock_mutex) -: QueuedEvent(engine, responder, true), +DestroyEvent::DestroyEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, Node* node, bool block) +: QueuedEvent(engine, responder, block, source), m_path(node->path()), m_node(node), m_patch_listnode(NULL), diff --git a/src/libs/engine/events/DestroyEvent.h b/src/libs/engine/events/DestroyEvent.h index 92b1c194..fc2995a3 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> responder, FrameTime timestamp, QueuedEventSource* source, const string& path, bool lock_mutex = true); - DestroyEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime timestamp, Node* node, bool lock_mutex = true); + DestroyEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime timestamp, QueuedEventSource* source, const string& path, bool block = true); + DestroyEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime timestamp, QueuedEventSource* source, Node* node, bool block = true); ~DestroyEvent(); void pre_process(); |