question about buffer size management
The wiki says:
PipeWire can adapt the latency dynamically, which is important for power usage on a laptop. When low latency is required, the system can switch automatically and seamlessly to smaller buffer sizes.
Is this possible using the JACK API or will applications have to use the new PipeWire API to take advantage of this? I have been testing Mixxx with the JACK API using the
PIPEWIRE_LATENCY environment variable to set the buffer size. It is awesome that I can now switch between playing sound in Mixxx and Firefox without having to fuss around with starting/stopping JACK/PulseAudio or making them communicate with each other. However, if set
PIPEWIRE_LATENCY=512/44100 for Mixxx and leave it running in the background when I am not using it, I hear some xruns from Firefox. When I close Mixxx, the xruns go away in Firefox. If I understand correctly, this is because running Mixxx with
PIPEWIRE_LATENCY keeps the whole graph at that buffer size/sample rate as long as the process with
PIPEWIRE_LATENCY in its environment is running. Does that only apply with the JACK API? If we implement a new PipeWire backend for PortAudio, could Mixxx notify PipeWire when it is not processing any audio so PipeWire is free to increase the buffer size, then automatically switch back to the lower buffer size when I press play in Mixxx?