diff options
Diffstat (limited to 'src/server/BufferFactory.cpp')
-rw-r--r-- | src/server/BufferFactory.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/server/BufferFactory.cpp b/src/server/BufferFactory.cpp index 97a9b933..7c1e0b17 100644 --- a/src/server/BufferFactory.cpp +++ b/src/server/BufferFactory.cpp @@ -100,19 +100,25 @@ BufferFactory::default_size(LV2_URID type) const { if (type == _uris.atom_Float) { return sizeof(LV2_Atom_Float); - } else if (type == _uris.atom_Sound) { + } + + if (type == _uris.atom_Sound) { return audio_buffer_size(_engine.block_length()); - } else if (type == _uris.atom_URID) { + } + + if (type == _uris.atom_URID) { return sizeof(LV2_Atom_URID); - } else if (type == _uris.atom_Sequence) { + } + + if (type == _uris.atom_Sequence) { if (_seq_size == 0) { return _engine.sequence_size(); - } else { - return _seq_size; } - } else { - return 0; + + return _seq_size; } + + return 0; } Buffer* |