summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events/ConnectionEvent.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-18 08:06:14 +0000
committerDavid Robillard <d@drobilla.net>2006-06-18 08:06:14 +0000
commit172a0119ee0a0bb6d50836c70936907c3eb71c9e (patch)
treecbcc56285b033bb9857b9be85f5f9be193b6f38f /src/libs/engine/events/ConnectionEvent.cpp
parente6f42fd640dcbad6b2e39cc85bdf307d197278b0 (diff)
downloadingen-172a0119ee0a0bb6d50836c70936907c3eb71c9e.tar.gz
ingen-172a0119ee0a0bb6d50836c70936907c3eb71c9e.tar.bz2
ingen-172a0119ee0a0bb6d50836c70936907c3eb71c9e.zip
More work on new ports implementation;
lots of mass renaming and code removal. git-svn-id: http://svn.drobilla.net/lad/grauph@52 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events/ConnectionEvent.cpp')
-rw-r--r--src/libs/engine/events/ConnectionEvent.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp
index fe3b991e..fcfa3bbc 100644
--- a/src/libs/engine/events/ConnectionEvent.cpp
+++ b/src/libs/engine/events/ConnectionEvent.cpp
@@ -25,7 +25,6 @@
#include "Patch.h"
#include "ClientBroadcaster.h"
#include "Port.h"
-#include "PortInfo.h"
#include "Maid.h"
#include "ObjectStore.h"
#include "util/Path.h"
@@ -82,16 +81,16 @@ ConnectionEvent::pre_process()
return;
}
- if (port1->port_info()->type() != port2->port_info()->type()) {
+ if (port1->type() != port2->type()) {
m_error = TYPE_MISMATCH;
QueuedEvent::pre_process();
return;
}
- if (port1->port_info()->is_output() && port2->port_info()->is_input()) {
+ if (port1->is_output() && port2->is_input()) {
m_src_port = port1;
m_dst_port = port2;
- } else if (port2->port_info()->is_output() && port1->port_info()->is_input()) {
+ } else if (port2->is_output() && port1->is_input()) {
m_src_port = port2;
m_dst_port = port1;
} else {
@@ -101,11 +100,11 @@ ConnectionEvent::pre_process()
}
// Create the typed event to actually do the work
- const PortType type = port1->port_info()->type();
- if (type == AUDIO || type == CONTROL) {
+ const DataType type = port1->type();
+ if (type == DataType::FLOAT) {
m_typed_event = new TypedConnectionEvent<sample>(m_responder,
(OutputPort<sample>*)m_src_port, (InputPort<sample>*)m_dst_port);
- } else if (type == MIDI) {
+ } else if (type == DataType::MIDI) {
m_typed_event = new TypedConnectionEvent<MidiMessage>(m_responder,
(OutputPort<MidiMessage>*)m_src_port, (InputPort<MidiMessage>*)m_dst_port);
} else {