PortAudio / portaudio

PortAudio is a cross-platform, open-source C language library for real-time audio input and output.
Other
1.39k stars 291 forks source link

JACK: try to use stable port names #888

Closed stefanha closed 3 months ago

stefanha commented 4 months ago

JACK connection managers save/load the connection graph so users don't need to create connections manually every time. This depends on stable port names but PortAudio currently generates incrementing port names throughout the lifetime of a running process.

Reset the port name counters when all streams are closed so that the same port names are generated when the streams are opened again.

This is not a perfect solution because applications that open streams in different orders each time or never close all open streams before restarting audio processing will not reset the port counters. However, typical applications should work with this simple approach and it's an improvement over current behavior.

Tested with Audacity 3.3.3 on Fedora 39.

RossBencina commented 3 months ago

Phil and I are slightly ambivalent on merging this because it is a behavior change that could break user expectations in the case where the reopened streams are unreleated and should not be reconnected. Our assessment is:

My position is that for serious use there should be a way for the application to set the stream names as discussed in #366.