summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/BufferFactory.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/BufferFactory.cpp b/src/server/BufferFactory.cpp
index d61653bf..2f6c716d 100644
--- a/src/server/BufferFactory.cpp
+++ b/src/server/BufferFactory.cpp
@@ -135,13 +135,13 @@ BufferFactory::create(PortType type, size_t size)
size = default_buffer_size(type);
if (type.is_control()) {
- AudioBuffer* ret = new AudioBuffer(*this, type, size);
- ret->atom()->type = _uris->atom_Vector.id;
- ((LV2_Atom_Vector*)ret->atom()->body)->elem_type = _uris->atom_Float32.id;
+ AudioBuffer* ret = new AudioBuffer(*this, type, audio_buffer_size(size));
+ ret->atom()->type = _uris->atom_Float32.id;
buffer = ret;
} else if (type.is_audio()) {
- AudioBuffer* ret = new AudioBuffer(*this, type, size);
- ret->atom()->type = _uris->atom_Float32.id;
+ AudioBuffer* ret = new AudioBuffer(*this, type, audio_buffer_size(size));
+ ret->atom()->type = _uris->atom_Vector.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);