summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events/ConnectionEvent.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/ConnectionEvent.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/ConnectionEvent.cpp')
-rw-r--r--src/libs/engine/events/ConnectionEvent.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp
index d229ab7c..15b79b46 100644
--- a/src/libs/engine/events/ConnectionEvent.cpp
+++ b/src/libs/engine/events/ConnectionEvent.cpp
@@ -18,8 +18,7 @@
#include <string>
#include "Responder.h"
#include "types.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "TypedConnection.h"
#include "InputPort.h"
#include "OutputPort.h"
@@ -37,7 +36,7 @@ namespace Om {
//// ConnectionEvent ////
-ConnectionEvent::ConnectionEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& src_port_path, const string& dst_port_path)
+ConnectionEvent::ConnectionEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path)
: QueuedEvent(responder, timestamp),
m_src_port_path(src_port_path),
m_dst_port_path(dst_port_path),
@@ -67,7 +66,7 @@ ConnectionEvent::pre_process()
return;
}
- /*m_patch = om->object_store()->find_patch(m_src_port_path.parent().parent());
+ /*m_patch = Ingen::instance().object_store()->find_patch(m_src_port_path.parent().parent());
if (m_patch == NULL) {
m_error = PORT_NOT_FOUND;
@@ -75,8 +74,8 @@ ConnectionEvent::pre_process()
return;
}*/
- m_src_port = om->object_store()->find_port(m_src_port_path);
- m_dst_port = om->object_store()->find_port(m_dst_port_path);
+ m_src_port = Ingen::instance().object_store()->find_port(m_src_port_path);
+ m_dst_port = Ingen::instance().object_store()->find_port(m_dst_port_path);
if (m_src_port == NULL || m_dst_port == NULL) {
m_error = PORT_NOT_FOUND;
@@ -105,8 +104,8 @@ ConnectionEvent::pre_process()
// Create the typed event to actually do the work
const DataType type = m_src_port->type();
if (type == DataType::FLOAT) {
- m_typed_event = new TypedConnectionEvent<sample>(_responder, _time_stamp,
- dynamic_cast<OutputPort<sample>*>(m_src_port), dynamic_cast<InputPort<sample>*>(m_dst_port));
+ m_typed_event = new TypedConnectionEvent<Sample>(_responder, _time_stamp,
+ dynamic_cast<OutputPort<Sample>*>(m_src_port), dynamic_cast<InputPort<Sample>*>(m_dst_port));
} else if (type == DataType::MIDI) {
m_typed_event = new TypedConnectionEvent<MidiMessage>(_responder, _time_stamp,
dynamic_cast<OutputPort<MidiMessage>*>(m_src_port), dynamic_cast<InputPort<MidiMessage>*>(m_dst_port));
@@ -123,7 +122,7 @@ ConnectionEvent::pre_process()
void
-ConnectionEvent::execute(samplecount offset)
+ConnectionEvent::execute(SampleCount offset)
{
QueuedEvent::execute(offset);
@@ -151,7 +150,7 @@ ConnectionEvent::post_process()
template <typename T>
-TypedConnectionEvent<T>::TypedConnectionEvent(CountedPtr<Responder> responder, samplecount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port)
+TypedConnectionEvent<T>::TypedConnectionEvent(CountedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port)
: QueuedEvent(responder, timestamp),
m_src_port(src_port),
m_dst_port(dst_port),
@@ -229,14 +228,14 @@ TypedConnectionEvent<T>::pre_process()
template <typename T>
void
-TypedConnectionEvent<T>::execute(samplecount offset)
+TypedConnectionEvent<T>::execute(SampleCount offset)
{
if (m_succeeded) {
// These must be inserted here, since they're actually used by the audio thread
m_dst_port->add_connection(m_port_listnode);
m_patch->add_connection(m_patch_listnode);
if (m_patch->process_order() != NULL)
- om->maid()->push(m_patch->process_order());
+ Ingen::instance().maid()->push(m_patch->process_order());
m_patch->process_order(m_process_order);
}
}
@@ -251,7 +250,7 @@ TypedConnectionEvent<T>::post_process()
_responder->respond_ok();
- om->client_broadcaster()->send_connection(m_connection);
+ Ingen::instance().client_broadcaster()->send_connection(m_connection);
} else {
_responder->respond_error("Unable to make connection.");
}