13
0

Use a sensible size for DSP to GUI MIDI messages

See also a1ba561cc5. JACK2 and pipewire unconditionally
report 32kB, Ardour internal backends report 8kB, also
independent of the buffersize.
While jack1 by default announces the audio buffersize.

A sensible value assumes that the GUI reads the FIFO at
a least 25fps, while also allowing MIDI ports to merge
data (hence 2 * raw_buffer_size). Yet limit to 64k per track.
This commit is contained in:
Robin Gareus 2024-08-25 00:04:17 +02:00
parent c92c8c8fa2
commit eac3283b49
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -60,7 +60,7 @@ DiskWriter::DiskWriter (Session& s, Track& t, string const & str, DiskIOProcesso
, _accumulated_capture_offset (0)
, _transport_looped (false)
, _transport_loop_sample (0)
, _gui_feed_fifo (AudioEngine::instance()->raw_buffer_size (DataType::MIDI))
, _gui_feed_fifo (min<size_t> (64000, max<size_t> (s.sample_rate() / 10, 2 * AudioEngine::instance()->raw_buffer_size (DataType::MIDI))))
{
DiskIOProcessor::init ();
_xruns.reserve (128);