summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/AudioBuffer.cpp8
-rw-r--r--src/server/AudioBuffer.hpp4
-rw-r--r--src/server/BufferFactory.cpp4
3 files changed, 8 insertions, 8 deletions
diff --git a/src/server/AudioBuffer.cpp b/src/server/AudioBuffer.cpp
index cca2f3ae..157eda6c 100644
--- a/src/server/AudioBuffer.cpp
+++ b/src/server/AudioBuffer.cpp
@@ -54,9 +54,9 @@ AudioBuffer::AudioBuffer(BufferFactory& bufs, PortType type, size_t size)
} else {
assert(type == PortType::AUDIO);
atom()->type = 0;//map->vector_type;
- LV2_Atom_Vector* body = (LV2_Atom_Vector*)LV2_ATOM_BODY(atom());
- body->elem_count = size / sizeof(Sample);
- body->elem_type = 0;//map->float_type;
+ LV2_Atom_Vector* body = (LV2_Atom_Vector*)atom();
+ body->body.elem_count = size / sizeof(Sample);
+ body->body.elem_type = 0;//map->float_type;
}
/*debug << "Created Audio Buffer" << endl
<< "\tobject @ " << (void*)atom() << endl
@@ -74,7 +74,7 @@ AudioBuffer::resize(size_t size)
{
if (_type == PortType::AUDIO) {
ObjectBuffer::resize(size + sizeof(LV2_Atom_Vector));
- vector()->elem_count = size / sizeof(Sample);
+ vector()->body.elem_count = size / sizeof(Sample);
}
clear();
}
diff --git a/src/server/AudioBuffer.hpp b/src/server/AudioBuffer.hpp
index 4edc45c9..262b03c1 100644
--- a/src/server/AudioBuffer.hpp
+++ b/src/server/AudioBuffer.hpp
@@ -58,8 +58,8 @@ public:
inline SampleCount nframes() const {
return (is_control())
- ? 1
- : (_size - sizeof(LV2_Atom) - sizeof(LV2_Atom_Vector)) / sizeof(Sample);
+ ? 1
+ : (_size - sizeof(LV2_Atom_Vector)) / sizeof(Sample);
}
inline Sample& value_at(size_t offset) const
diff --git a/src/server/BufferFactory.cpp b/src/server/BufferFactory.cpp
index 7d52ed49..42bb3b0b 100644
--- a/src/server/BufferFactory.cpp
+++ b/src/server/BufferFactory.cpp
@@ -70,7 +70,7 @@ BufferFactory::set_block_length(SampleCount block_length)
size_t
BufferFactory::audio_buffer_size(SampleCount nframes)
{
- return sizeof(LV2_Atom) + sizeof(LV2_Atom_Vector) + (nframes * sizeof(float));
+ return sizeof(LV2_Atom_Vector) + (nframes * sizeof(float));
}
size_t
@@ -141,7 +141,7 @@ BufferFactory::create(PortType type, size_t size)
} else if (type.is_audio()) {
AudioBuffer* ret = new AudioBuffer(*this, type, audio_buffer_size(size));
ret->atom()->type = _uris->atom_Vector.id;
- ((LV2_Atom_Vector*)LV2_ATOM_BODY(ret->atom()))->elem_type = _uris->atom_Float32.id;
+ ((LV2_Atom_Vector*)ret->atom())->body.elem_type = _uris->atom_Float32.id;
buffer = ret;
} else if (type.is_events()) {
buffer = new EventBuffer(*this, size);