summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/engine/ObjectBuffer.cpp12
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;
}