diff options
author | Robin Gareus <robin@gareus.org> | 2014-05-17 22:13:03 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-05-17 22:13:03 +0200 |
commit | 205b5d97d52432a990ee7aaf4e2f53d0feacf0b8 (patch) | |
tree | fac763efdd004440199dbbdad3350f1a35cf05a8 /libs/ardour/thread_buffers.cc | |
parent | 19d99d4bc558d716273e92ab02d15f980ff6fbbd (diff) |
partial fix for #5871 - midi-buffer size
Diffstat (limited to 'libs/ardour/thread_buffers.cc')
-rw-r--r-- | libs/ardour/thread_buffers.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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); |