From 4c299323440923891b9c583a354116000eb143cc Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 11 Mar 2012 05:22:08 +0000 Subject: Implement cv:CVPort (fix #790). Not well-tested, but at least works somewhat. Use new style LV2 URI defines (and fix invalid atom URIs). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4050 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/BufferFactory.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/server/BufferFactory.cpp') diff --git a/src/server/BufferFactory.cpp b/src/server/BufferFactory.cpp index 88e417cd..a26b0361 100644 --- a/src/server/BufferFactory.cpp +++ b/src/server/BufferFactory.cpp @@ -78,6 +78,7 @@ BufferFactory::default_buffer_size(PortType type) { switch (type.symbol()) { case PortType::AUDIO: + case PortType::CV: return audio_buffer_size(_engine.driver()->block_length()); case PortType::CONTROL: return sizeof(LV2_Atom) + sizeof(float); @@ -136,12 +137,12 @@ BufferFactory::create(PortType type, size_t size) if (type.is_control()) { AudioBuffer* ret = new AudioBuffer(*this, type, audio_buffer_size(size)); - ret->atom()->type = _uris->atom_Float32.id; + ret->atom()->type = _uris->atom_Float.id; buffer = ret; - } else if (type.is_audio()) { + } else if (type.is_audio() || type.is_cv()) { AudioBuffer* ret = new AudioBuffer(*this, type, audio_buffer_size(size)); ret->atom()->type = _uris->atom_Vector.id; - ((LV2_Atom_Vector*)ret->atom())->body.child_type = _uris->atom_Float32.id; + ((LV2_Atom_Vector*)ret->atom())->body.child_type = _uris->atom_Float.id; buffer = ret; } else if (type.is_events()) { buffer = new EventBuffer(*this, size); -- cgit v1.2.1