summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events/SetPortValueQueuedEvent.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-07-18 05:46:24 +0000
committerDavid Robillard <d@drobilla.net>2006-07-18 05:46:24 +0000
commit2dbd0cd81dff72aea42344188d20f7d7f6d20e1a (patch)
treea3af76b4164c75b19d3973c88b05591be9e9d67d /src/libs/engine/events/SetPortValueQueuedEvent.cpp
parent1d81360a04e0e5c0a57b8be1708e29a3f2bde848 (diff)
downloadingen-2dbd0cd81dff72aea42344188d20f7d7f6d20e1a.tar.gz
ingen-2dbd0cd81dff72aea42344188d20f7d7f6d20e1a.tar.bz2
ingen-2dbd0cd81dff72aea42344188d20f7d7f6d20e1a.zip
Removed globals (Om.h)
git-svn-id: http://svn.drobilla.net/lad/ingen@96 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events/SetPortValueQueuedEvent.cpp')
-rw-r--r--src/libs/engine/events/SetPortValueQueuedEvent.cpp19
1 files changed, 9 insertions, 10 deletions
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> responder, samplecount timestamp, size_t voice_num, const string& port_path, sample val)
+SetPortValueQueuedEvent::SetPortValueQueuedEvent(CountedPtr<Responder> 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> responder
}
-SetPortValueQueuedEvent::SetPortValueQueuedEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& port_path, sample val)
+SetPortValueQueuedEvent::SetPortValueQueuedEvent(CountedPtr<Responder> 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<sample>*)m_port)->set_value(m_val, offset);
+ ((TypedPort<Sample>*)m_port)->set_value(m_val, offset);
else
- ((TypedPort<sample>*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range
+ ((TypedPort<Sample>*)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) {