From f25bd74cbd17f474318a075c8e383e33ea34798d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 10 Dec 2011 06:43:55 +0000 Subject: Fix buffer atom type initialisation. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3854 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/BufferFactory.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') 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); -- cgit v1.2.1