mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-15 09:55:55 +01:00
correct size computation for RTMidiBuffer, and reduce expansion amount
This commit is contained in:
parent
08ab8fc58a
commit
b017f20141
1 changed files with 2 additions and 4 deletions
|
|
@ -120,10 +120,8 @@ RTMidiBuffer::write (TimeType time, Evoral::EventType /*type*/, uint32_t size, c
|
|||
{
|
||||
/* This buffer stores only MIDI, we don't care about the value of "type" */
|
||||
|
||||
const size_t bytes_to_merge = sizeof (time) + sizeof (uint32_t);
|
||||
|
||||
if (_size + bytes_to_merge > _capacity) {
|
||||
resize (_capacity + 8192); // XXX 8192 is completely arbitrary
|
||||
if (_size == _capacity) {
|
||||
resize (_capacity + 1024); // XXX 1024 is completely arbitrary
|
||||
}
|
||||
|
||||
_data[_size].timestamp = time;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue