summaryrefslogtreecommitdiffstats
path: root/src/server/BufferFactory.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-08-31 01:24:57 +0000
committerDavid Robillard <d@drobilla.net>2014-08-31 01:24:57 +0000
commita2792bd09212eed55bba1aa30dc09043a6955486 (patch)
treed4262f760d4522bc6f1c99778987aada332b9e7e /src/server/BufferFactory.cpp
parente3ecb2b439bd03d27b5e11efe430c24f0ebe6283 (diff)
downloadingen-a2792bd09212eed55bba1aa30dc09043a6955486.tar.gz
ingen-a2792bd09212eed55bba1aa30dc09043a6955486.tar.bz2
ingen-a2792bd09212eed55bba1aa30dc09043a6955486.zip
Use float sequences for sample-accurate control ports.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5462 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/BufferFactory.cpp')
-rw-r--r--src/server/BufferFactory.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/BufferFactory.cpp b/src/server/BufferFactory.cpp
index 6390a36b..88ec195b 100644
--- a/src/server/BufferFactory.cpp
+++ b/src/server/BufferFactory.cpp
@@ -97,6 +97,7 @@ BufferFactory::default_size(LV2_URID type) const
BufferRef
BufferFactory::get_buffer(LV2_URID type,
+ LV2_URID value_type,
uint32_t capacity,
bool real_time,
bool force_create)
@@ -116,7 +117,7 @@ BufferFactory::get_buffer(LV2_URID type,
if (!try_head) {
if (!real_time) {
- return create(type, capacity);
+ return create(type, value_type, capacity);
} else {
_engine.world()->log().error("Failed to obtain buffer");
return BufferRef();
@@ -124,7 +125,7 @@ BufferFactory::get_buffer(LV2_URID type,
}
try_head->_next = NULL;
- try_head->set_type(type);
+ try_head->set_type(type, value_type);
return BufferRef(try_head);
}
@@ -135,7 +136,7 @@ BufferFactory::silent_buffer()
}
BufferRef
-BufferFactory::create(LV2_URID type, uint32_t capacity)
+BufferFactory::create(LV2_URID type, LV2_URID value_type, uint32_t capacity)
{
if (capacity == 0) {
capacity = default_size(type);
@@ -145,7 +146,7 @@ BufferFactory::create(LV2_URID type, uint32_t capacity)
capacity = std::max(capacity, default_size(_uris.atom_Sound));
}
- return BufferRef(new Buffer(*this, type, capacity));
+ return BufferRef(new Buffer(*this, type, value_type, capacity));
}
void