jack_port_buffer() should return consistent result within process() callback
- PipeWire version (
pipewire --version
): 0.3.32+dfsg1-1ubuntu21.04 (and looks likemaster
too) - Distribution and distribution version (
PRETTY_NAME
from/etc/os-release
): Ubuntu 21.04 - Desktop Environment: -
- Kernel version (
uname -r
): -
Description of Problem:
The JACK API specifies that jack_port_get_buffer
returns the memory associated with a port, and that it cannot be relied on between callbacks. Within the same callback, it is expected to return the same memory address. Applications are free to call jack_port_get_buffer
multiple times, without API-visible side-effects.
On Pipewire, though, calling this will find / allocate a fresh buffer and return that. If an application calls jack_port_get_buffer
multiple times for, say, different phases of processing, each will get a different buffer. It seems the last-returned buffer is used for audio output.
This bug affects recent versions of Hydrogen.
How Reproducible:
Deterministically repeatable
Steps to Reproduce:
- Build Hydrogen from
master
ordevelopment
- Don ear protection
- pw-jack hydrogen
Actual Results:
Expected Results:
Additional Info (as attachments):
-
pw-dump > pw-dump.log
: