diff options
author | David Robillard <d@drobilla.net> | 2010-02-19 06:14:10 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-19 06:14:10 +0000 |
commit | bf684d5e7cd3fcfad1264ff01bb233b3c467d248 (patch) | |
tree | e31b55c7310e147016ae751099989942add63bf8 /src/engine | |
parent | d733603ea25388c6ebb288a5e8a3354b7ed1954f (diff) | |
download | ingen-bf684d5e7cd3fcfad1264ff01bb233b3c467d248.tar.gz ingen-bf684d5e7cd3fcfad1264ff01bb233b3c467d248.tar.bz2 ingen-bf684d5e7cd3fcfad1264ff01bb233b3c467d248.zip |
Fix audio->control connections.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2465 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/ObjectBuffer.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/engine/ObjectBuffer.cpp b/src/engine/ObjectBuffer.cpp index 2c319b34..92138ca0 100644 --- a/src/engine/ObjectBuffer.cpp +++ b/src/engine/ObjectBuffer.cpp @@ -100,9 +100,17 @@ ObjectBuffer::port_data(PortType port_type) { switch (port_type.symbol()) { case PortType::CONTROL: - return object()->body; case PortType::AUDIO: - return ((LV2_Vector_Body*)object()->body)->elems; + switch (_type.symbol()) { + case PortType::CONTROL: + return (float*)object()->body; + case PortType::AUDIO: + return ((LV2_Vector_Body*)object()->body)->elems; + default: + warn << "Audio data requested from non-audio buffer" << endl; + return NULL; + } + break; default: return _buf; } |