mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-02 22:25:17 +00:00
3376b96f2a
Ardour calls jack_port_get_buffer() from multiple threads. For audio buffers this will result in mixing the input samples into the target buffer and there is no window for having a corrupt buffer. For MIDI, there is a problem because we need to convert from and to PipeWire MIDI and while we do that from multiple threads, the midi buffer can be incomplete or corrupt. Fix this by building the intermediate POD to a thread-local scratch area and then copy it to the target buffer. If this is done from multiple threads there is no moment where incomplete data can be seen in the target buffer. Make the complete midi-scratch buffer thread_local so that we also avoid a race when converting midi data from a foreign port. When we write into the scratch buffer when mixing and converting input midi data, we also avoid a race there. Fixes #3632 |
||
---|---|---|
.. | ||
examples | ||
jack | ||
src | ||
meson.build |