summaryrefslogtreecommitdiffstats
path: root/src/server/ObjectBuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/ObjectBuffer.cpp')
-rw-r--r--src/server/ObjectBuffer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/ObjectBuffer.cpp b/src/server/ObjectBuffer.cpp
index b3b74079..b5a96dbd 100644
--- a/src/server/ObjectBuffer.cpp
+++ b/src/server/ObjectBuffer.cpp
@@ -102,9 +102,9 @@ ObjectBuffer::port_data(PortType port_type, SampleCount offset)
case PortType::AUDIO:
switch (_type.symbol()) {
case PortType::CONTROL:
- return (float*)atom()->body;
+ return (float*)LV2_ATOM_BODY(atom());
case PortType::AUDIO:
- return (float*)((LV2_Atom_Vector*)atom()->body)->elems + offset;
+ return (float*)LV2_ATOM_CONTENTS(LV2_Atom_Vector, atom()) + offset;
default:
warn << "Audio data requested from non-audio buffer" << endl;
return NULL;
@@ -123,9 +123,9 @@ ObjectBuffer::port_data(PortType port_type, SampleCount offset) const
case PortType::AUDIO:
switch (_type.symbol()) {
case PortType::CONTROL:
- return (float*)atom()->body;
+ return (float*)LV2_ATOM_BODY(atom());
case PortType::AUDIO:
- return (float*)((LV2_Atom_Vector*)atom()->body)->elems + offset;
+ return (float*)LV2_ATOM_CONTENTS(LV2_Atom_Vector, atom()) + offset;
default:
warn << "Audio data requested from non-audio buffer" << endl;
return NULL;