summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/LV2Node.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-09 01:01:50 +0000
committerDavid Robillard <d@drobilla.net>2007-04-09 01:01:50 +0000
commit6eec851cda92e1030173dbfd613c44883ced6816 (patch)
tree895691d6f439c1c0fcf26946832c2b0de7c9593c /src/libs/engine/LV2Node.cpp
parentf211975fd97c39668b61170d11960bd1c565ae79 (diff)
downloadingen-6eec851cda92e1030173dbfd613c44883ced6816.tar.gz
ingen-6eec851cda92e1030173dbfd613c44883ced6816.tar.bz2
ingen-6eec851cda92e1030173dbfd613c44883ced6816.zip
MIDI patching. wooo!
git-svn-id: http://svn.drobilla.net/lad/ingen@429 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/LV2Node.cpp')
-rw-r--r--src/libs/engine/LV2Node.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/libs/engine/LV2Node.cpp b/src/libs/engine/LV2Node.cpp
index 4ea29d1f..459d3c78 100644
--- a/src/libs/engine/LV2Node.cpp
+++ b/src/libs/engine/LV2Node.cpp
@@ -93,7 +93,9 @@ LV2Node::instantiate()
SLV2PortClass port_class = slv2_port_get_class(_lv2_plugin, id);
- if (port_class == SLV2_AUDIO_INPUT || port_class == SLV2_AUDIO_OUTPUT)
+ // FIXME: MIDI buffer size?
+ if (port_class == SLV2_AUDIO_INPUT || port_class == SLV2_AUDIO_OUTPUT
+ || port_class == SLV2_MIDI_INPUT || port_class == SLV2_MIDI_OUTPUT)
port_buffer_size = _buffer_size;
else
port_buffer_size = 1;
@@ -184,10 +186,13 @@ LV2Node::set_port_buffer(size_t voice, size_t port_num, Buffer* buf)
{
assert(voice < _poly);
- if (buf->type() == DataType::FLOAT)
+ if (buf->type() == DataType::FLOAT) {
slv2_instance_connect_port(_instances[voice], port_num, ((AudioBuffer*)buf)->data());
- else if (buf->type() == DataType::MIDI)
- slv2_instance_connect_port(_instances[voice], port_num, ((MidiBuffer*)buf)->data()->midi);
+ } 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());
+ }
}