summaryrefslogtreecommitdiffstats
path: root/src/server/BufferFactory.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-10 06:43:55 +0000
committerDavid Robillard <d@drobilla.net>2011-12-10 06:43:55 +0000
commitf25bd74cbd17f474318a075c8e383e33ea34798d (patch)
tree175feaef3952e91b0c33a218a7c2b8c6bd4cb49a /src/server/BufferFactory.cpp
parentfcd02442b22496b658fcb045f129ca622549e1c8 (diff)
downloadingen-f25bd74cbd17f474318a075c8e383e33ea34798d.tar.gz
ingen-f25bd74cbd17f474318a075c8e383e33ea34798d.tar.bz2
ingen-f25bd74cbd17f474318a075c8e383e33ea34798d.zip
Fix buffer atom type initialisation.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3854 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/BufferFactory.cpp')
-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);