summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-10-25 06:48:45 +0000
committerDavid Robillard <d@drobilla.net>2015-10-25 06:48:45 +0000
commitffae1d83620f0f57977c95e5e04f456bf0324b8c (patch)
tree22629fb1d26c908bd3b4545f4da8bb4fb1ead94e
parent94d2f7cfc7e573c6fdd7487b1ab207d01e9fdbcf (diff)
downloadingen-ffae1d83620f0f57977c95e5e04f456bf0324b8c.tar.gz
ingen-ffae1d83620f0f57977c95e5e04f456bf0324b8c.tar.bz2
ingen-ffae1d83620f0f57977c95e5e04f456bf0324b8c.zip
Fix audio=>control connections
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5784 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/server/Buffer.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/server/Buffer.cpp b/src/server/Buffer.cpp
index d4aa37c4..dfa3c506 100644
--- a/src/server/Buffer.cpp
+++ b/src/server/Buffer.cpp
@@ -199,15 +199,19 @@ Buffer::port_data(PortType port_type, SampleCount offset)
{
switch (port_type.id()) {
case PortType::ID::CONTROL:
+ case PortType::ID::CV:
+ case PortType::ID::AUDIO:
if (_type == _factory.uris().atom_Float) {
return &get<LV2_Atom_Float>()->body;
+ } else if (_type == _factory.uris().atom_Sound) {
+ return (Sample*)_buf;
}
break;
- case PortType::ID::CV:
- case PortType::ID::AUDIO:
- return (Sample*)_buf;
- default:
- return _buf;
+ case PortType::ID::ATOM:
+ if (_type != _factory.uris().atom_Sound) {
+ return _buf;
+ }
+ default: break;
}
return NULL;
}