diff options
author | David Robillard <d@drobilla.net> | 2012-05-23 03:45:05 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-05-23 03:45:05 +0000 |
commit | dded57fdc23b7c7c0d4a3c58a8dddf7b25351efa (patch) | |
tree | e91e365a44ff5a070bd41ea0aff5bb2db2f47436 /src/server/BufferFactory.cpp | |
parent | 2ea7d01d1878563f863763fc88df23dcbca8536a (diff) | |
download | ingen-dded57fdc23b7c7c0d4a3c58a8dddf7b25351efa.tar.gz ingen-dded57fdc23b7c7c0d4a3c58a8dddf7b25351efa.tar.bz2 ingen-dded57fdc23b7c7c0d4a3c58a8dddf7b25351efa.zip |
Fix creation of several ports in rapid succession (e.g. on patch load).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4447 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/BufferFactory.cpp')
-rw-r--r-- | src/server/BufferFactory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/BufferFactory.cpp b/src/server/BufferFactory.cpp index 2726d7e3..a11f1c35 100644 --- a/src/server/BufferFactory.cpp +++ b/src/server/BufferFactory.cpp @@ -74,7 +74,7 @@ BufferFactory::audio_buffer_size(SampleCount nframes) } uint32_t -BufferFactory::default_buffer_size(LV2_URID type) +BufferFactory::default_size(LV2_URID type) const { if (type == _uris.atom_Float) { return sizeof(LV2_Atom_Float); @@ -132,14 +132,14 @@ BufferFactory::create(LV2_URID type, uint32_t capacity) Buffer* buffer = NULL; if (capacity == 0) { - capacity = default_buffer_size(type); + capacity = default_size(type); } if (type == _uris.atom_Float) { assert(capacity >= sizeof(LV2_Atom_Float)); buffer = new AudioBuffer(*this, type, capacity); } else if (type == _uris.atom_Sound) { - assert(capacity >= default_buffer_size(_uris.atom_Sound)); + assert(capacity >= default_size(_uris.atom_Sound)); buffer = new AudioBuffer(*this, type, capacity); } else { buffer = new Buffer(*this, type, capacity); |