13
0

Scale default Atom Ringbuffer size with samplerate

This increases the safe-margin for plugins producing more messages
sent to the plugin GUI (usually fixed ~25Hz updates)
This commit is contained in:
Robin Gareus 2017-01-19 21:07:22 +01:00
parent 5d7b6fdd62
commit 7617477609

View File

@ -1647,7 +1647,8 @@ LV2Plugin::write_from_ui(uint32_t index,
if (_atom_ev_buffers && _atom_ev_buffers[0]) {
bufsiz = lv2_evbuf_get_capacity(_atom_ev_buffers[0]);
}
rbs = max((size_t) bufsiz * 8, rbs);
int fact = ceilf(_session.frame_rate () / 3000.f);
rbs = max((size_t) bufsiz * std::max (8, fact), rbs);
_from_ui = new RingBuffer<uint8_t>(rbs);
}