From 205b5d97d52432a990ee7aaf4e2f53d0feacf0b8 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 17 May 2014 22:13:03 +0200 Subject: [PATCH] partial fix for #5871 - midi-buffer size --- libs/ardour/thread_buffers.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ardour/thread_buffers.cc b/libs/ardour/thread_buffers.cc index e469187ce9..94490ca912 100644 --- a/libs/ardour/thread_buffers.cc +++ b/libs/ardour/thread_buffers.cc @@ -60,7 +60,9 @@ ThreadBuffers::ensure_buffers (ChanCount howmany) for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { size_t count = std::max (scratch_buffers->available().get(*t), howmany.get(*t)); - size_t size = _engine->raw_buffer_size (*t) / sizeof (Sample); + size_t size = (*t == DataType::MIDI) + ? _engine->raw_buffer_size (*t) + : _engine->raw_buffer_size (*t) / sizeof (Sample); scratch_buffers->ensure_buffers (*t, count, size); mix_buffers->ensure_buffers (*t, count, size);