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:
parent
5d7b6fdd62
commit
7617477609
@ -1647,7 +1647,8 @@ LV2Plugin::write_from_ui(uint32_t index,
|
|||||||
if (_atom_ev_buffers && _atom_ev_buffers[0]) {
|
if (_atom_ev_buffers && _atom_ev_buffers[0]) {
|
||||||
bufsiz = lv2_evbuf_get_capacity(_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);
|
_from_ui = new RingBuffer<uint8_t>(rbs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user