JACK client should stay connected throughout
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
Expected behavior of the wanted feature
When using JACK (or any other sound server for that matter), the JACK client created by mpv should keep its connections throughout. The current way of creating and destroying a JACK client at various events is fine for simple playback but unsuitable for anything more advanced.
Currently, the client disappears whenever the audio track is changed to "no audio" or when the channel layout is changed, forgetting the connections along the way. (Both might happen when walking through the playlist and encountering media with no audio and/or a channel layout different from the current one.)
There might be more reasons as well, but whatever the reason, the client should stay and also keep its connections throughout once the initial connections are established (see --jack-* options).
I think it would be best to
- create the JACK client whenever
--ao=jackis applied, and - that client should immediately get the current maximum number of output ports possible according to the current value(s) of
--audio-channels(or 2 in case a maximum number of channels cannot be derived from there), then, - the initial connections should be created according to the
--jack-*options, and - after the initial setup, no changes will be made whatsoever to the client and/or its connections unless
--aois changed to something that does not create a JACK client, in which case the client should be destroyed but- can be recreated based on the then-current settings by setting
--aotojackagain.
As there might be surprises (especially when using --audio-channels=auto), the proposed behavior should be optional.
Alternative behavior of the wanted feature
No response
Log File
No response
Sample Files
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating mpv's JACK audio-output implementation and the handling of --ao=jack, --audio-channels, and --jack-*. Trace when the JACK client and its connections are created or destroyed during track and channel-layout changes. Done means the requested persistent behavior is available as an optional setting and switching --ao away from and back to jack recreates the client from current settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- audio-video-rtc, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100