From 2dbd0cd81dff72aea42344188d20f7d7f6d20e1a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 18 Jul 2006 05:46:24 +0000 Subject: Removed globals (Om.h) git-svn-id: http://svn.drobilla.net/lad/ingen@96 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/events/SetPortValueQueuedEvent.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/libs/engine/events/SetPortValueQueuedEvent.cpp') diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.cpp b/src/libs/engine/events/SetPortValueQueuedEvent.cpp index 134ac462..71d796b1 100644 --- a/src/libs/engine/events/SetPortValueQueuedEvent.cpp +++ b/src/libs/engine/events/SetPortValueQueuedEvent.cpp @@ -16,8 +16,7 @@ #include "SetPortValueQueuedEvent.h" #include "Responder.h" -#include "Om.h" -#include "OmApp.h" +#include "Ingen.h" #include "TypedPort.h" #include "ClientBroadcaster.h" #include "Plugin.h" @@ -29,7 +28,7 @@ namespace Om { /** Voice-specific control setting */ -SetPortValueQueuedEvent::SetPortValueQueuedEvent(CountedPtr responder, samplecount timestamp, size_t voice_num, const string& port_path, sample val) +SetPortValueQueuedEvent::SetPortValueQueuedEvent(CountedPtr responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val) : QueuedEvent(responder, timestamp), m_voice_num(voice_num), m_port_path(port_path), @@ -40,7 +39,7 @@ SetPortValueQueuedEvent::SetPortValueQueuedEvent(CountedPtr responder } -SetPortValueQueuedEvent::SetPortValueQueuedEvent(CountedPtr responder, samplecount timestamp, const string& port_path, sample val) +SetPortValueQueuedEvent::SetPortValueQueuedEvent(CountedPtr responder, SampleCount timestamp, const string& port_path, Sample val) : QueuedEvent(responder, timestamp), m_voice_num(-1), m_port_path(port_path), @@ -55,7 +54,7 @@ void SetPortValueQueuedEvent::pre_process() { if (m_port == NULL) - m_port = om->object_store()->find_port(m_port_path); + m_port = Ingen::instance().object_store()->find_port(m_port_path); if (m_port == NULL) { m_error = PORT_NOT_FOUND; @@ -68,16 +67,16 @@ SetPortValueQueuedEvent::pre_process() void -SetPortValueQueuedEvent::execute(samplecount offset) +SetPortValueQueuedEvent::execute(SampleCount offset) { QueuedEvent::execute(offset); if (m_error == NO_ERROR) { assert(m_port != NULL); if (m_voice_num == -1) - ((TypedPort*)m_port)->set_value(m_val, offset); + ((TypedPort*)m_port)->set_value(m_val, offset); else - ((TypedPort*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range + ((TypedPort*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range } } @@ -89,13 +88,13 @@ SetPortValueQueuedEvent::post_process() assert(m_port != NULL); _responder->respond_ok(); - om->client_broadcaster()->send_control_change(m_port_path, m_val); + Ingen::instance().client_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); - om->client_broadcaster()->send_control_change(parent_port->path(), m_val); + Ingen::instance().client_broadcaster()->send_control_change(parent_port->path(), m_val); }*/ } else if (m_error == PORT_NOT_FOUND) { -- cgit v1.2.1