From 48f87f1f1649fb7e169fdaac2cd38370e8a4a1fa Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 8 Sep 2006 03:58:00 +0000 Subject: De-singleton-ified Engine Slight rework of Responder/ClientKey/ClientInterface for Requests git-svn-id: http://svn.drobilla.net/lad/ingen@119 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/events/EnablePatchEvent.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libs/engine/events/EnablePatchEvent.cpp') diff --git a/src/libs/engine/events/EnablePatchEvent.cpp b/src/libs/engine/events/EnablePatchEvent.cpp index b2b3ee08..132aefcc 100644 --- a/src/libs/engine/events/EnablePatchEvent.cpp +++ b/src/libs/engine/events/EnablePatchEvent.cpp @@ -25,8 +25,8 @@ namespace Ingen { -EnablePatchEvent::EnablePatchEvent(CountedPtr responder, SampleCount timestamp, const string& patch_path) -: QueuedEvent(responder, timestamp), +EnablePatchEvent::EnablePatchEvent(Engine& engine, CountedPtr responder, SampleCount timestamp, const string& patch_path) +: QueuedEvent(engine, responder, timestamp), m_patch_path(patch_path), m_patch(NULL), m_process_order(NULL) @@ -37,7 +37,7 @@ EnablePatchEvent::EnablePatchEvent(CountedPtr responder, SampleCount void EnablePatchEvent::pre_process() { - m_patch = Engine::instance().object_store()->find_patch(m_patch_path); + m_patch = _engine.object_store()->find_patch(m_patch_path); if (m_patch != NULL) { /* Any event that requires a new process order will set the patch's @@ -52,16 +52,16 @@ EnablePatchEvent::pre_process() void -EnablePatchEvent::execute(SampleCount offset) +EnablePatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end) { if (m_patch != NULL) { - m_patch->process(true); + m_patch->enable(); if (m_patch->process_order() == NULL) m_patch->process_order(m_process_order); } - QueuedEvent::execute(offset); + QueuedEvent::execute(nframes, start, end); } @@ -70,7 +70,7 @@ EnablePatchEvent::post_process() { if (m_patch != NULL) { _responder->respond_ok(); - Engine::instance().client_broadcaster()->send_patch_enable(m_patch_path); + _engine.client_broadcaster()->send_patch_enable(m_patch_path); } else { _responder->respond_error(string("Patch ") + m_patch_path + " not found"); } -- cgit v1.2.1