summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-24 01:15:24 +0000
committerDavid Robillard <d@drobilla.net>2007-07-24 01:15:24 +0000
commit69d18d7f335c5f19c13ff09d6fd04557de048ea1 (patch)
treee6dcfb078a2518e54529c252927214de99314854 /src
parent9d698e3e73f7d185f63a0b88ded5a4882189a08b (diff)
downloadingen-69d18d7f335c5f19c13ff09d6fd04557de048ea1.tar.gz
ingen-69d18d7f335c5f19c13ff09d6fd04557de048ea1.tar.bz2
ingen-69d18d7f335c5f19c13ff09d6fd04557de048ea1.zip
Working OSC patching.
git-svn-id: http://svn.drobilla.net/lad/ingen@606 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/libs/engine/Connection.cpp2
-rw-r--r--src/libs/engine/LV2Node.cpp6
-rw-r--r--src/libs/engine/Makefile.am1
-rw-r--r--src/libs/engine/OSCBuffer.cpp14
4 files changed, 15 insertions, 8 deletions
diff --git a/src/libs/engine/Connection.cpp b/src/libs/engine/Connection.cpp
index 6ae293c4..a4795ceb 100644
--- a/src/libs/engine/Connection.cpp
+++ b/src/libs/engine/Connection.cpp
@@ -49,6 +49,8 @@ Connection::Connection(Port* src_port, Port* dst_port)
if (_must_mix)
_local_buffer = BufferFactory::create(dst_port->type(), dst_port->buffer(0)->size());
+
+ cerr << src_port->path() << " -> " << dst_port->path() << " must mix: " << _must_mix << endl;
}
diff --git a/src/libs/engine/LV2Node.cpp b/src/libs/engine/LV2Node.cpp
index 7310e86b..888366136 100644
--- a/src/libs/engine/LV2Node.cpp
+++ b/src/libs/engine/LV2Node.cpp
@@ -25,6 +25,8 @@
#include "OutputPort.h"
#include "Plugin.h"
#include "AudioBuffer.h"
+#include "MidiBuffer.h"
+#include "OSCBuffer.h"
namespace Ingen {
@@ -199,9 +201,9 @@ LV2Node::set_port_buffer(size_t voice, size_t port_num, Buffer* buf)
if (buf->type() == DataType::FLOAT) {
slv2_instance_connect_port(_instances[voice], port_num, ((AudioBuffer*)buf)->data());
} else if (buf->type() == DataType::MIDI) {
- cerr << "Connecting " << path() << ":" << port_num << " -> " <<
- ((MidiBuffer*)buf)->data() << endl;
slv2_instance_connect_port(_instances[voice], port_num, ((MidiBuffer*)buf)->data());
+ } else if (buf->type() == DataType::OSC) {
+ slv2_instance_connect_port(_instances[voice], port_num, ((OSCBuffer*)buf)->data());
}
}
diff --git a/src/libs/engine/Makefile.am b/src/libs/engine/Makefile.am
index da7a9b14..7b873c93 100644
--- a/src/libs/engine/Makefile.am
+++ b/src/libs/engine/Makefile.am
@@ -50,6 +50,7 @@ libingen_engine_la_SOURCES = \
OSCBuffer.h \
OSCBuffer.cpp \
../../../../lv2/extensions/osc/lv2_osc.c \
+ ../../../../lv2/extensions/osc/lv2_osc_print.c \
BufferFactory.h \
BufferFactory.cpp \
Port.h \
diff --git a/src/libs/engine/OSCBuffer.cpp b/src/libs/engine/OSCBuffer.cpp
index 75201a30..ff23a281 100644
--- a/src/libs/engine/OSCBuffer.cpp
+++ b/src/libs/engine/OSCBuffer.cpp
@@ -46,14 +46,16 @@ OSCBuffer::OSCBuffer(size_t capacity)
bool
OSCBuffer::join(Buffer* buf)
{
- OSCBuffer* mbuf = dynamic_cast<OSCBuffer*>(buf);
- if (!mbuf)
+ OSCBuffer* obuf = dynamic_cast<OSCBuffer*>(buf);
+ if (!obuf)
return false;
//assert(mbuf->size() == _size);
- _joined_buf = mbuf;
+ _joined_buf = obuf;
+ cerr << "OSC buffer joined" << endl;
+
//_state = mbuf->_state;
return true;
@@ -75,9 +77,9 @@ OSCBuffer::unjoin()
bool
OSCBuffer::is_joined_to(Buffer* buf) const
{
- OSCBuffer* mbuf = dynamic_cast<OSCBuffer*>(buf);
- if (mbuf)
- return (data() == mbuf->data());
+ OSCBuffer* obuf = dynamic_cast<OSCBuffer*>(buf);
+ if (obuf)
+ return (data() == obuf->data());
return false;
}