clementine-player / Clementine

:tangerine: Clementine Music Player
https://www.clementine-player.org/
GNU General Public License v3.0
3.68k stars 670 forks source link

Jack plug names change with each stream (jackaudiosink) #4114

Open wkirkpa1 opened 10 years ago

wkirkpa1 commented 10 years ago

I could be missing something here, but it's driving me nuts. I use jackd as my playback sound server and have the option set in Clementine's prefs.

As playback rolls along, Clementine creates/switches between jack sockets "Clementine" and "Clementine_01" for each song. That's OK, I guess, but it also creates unique plug names under those sockets each time, like so, "out_jackaudiosink-X_Y" where Y is 1 or 2 (good), but X is any 'ol number (It may have a logic to it, I don't know, but that doesn't matter except to create a problem in jack)

Trouble is, with ever unique socket/plugnames being created, jack's patchbay can never map an automatic patch to the appropriate system output.

Every time a song changes, Clementine create the new socket and "random" plug name, so Jack has no idea what to do with them. User has to reconnect the patch by hand, every time, to restore music output.

I believe the "fix" is to just call the plugs "out_L" and "out_R", and losing they rest, but most particularly deleting "X" from the plugname.

highgain86j commented 8 years ago

This is being my problem too, but for use for patchbay specifically (so far), I have come up with a workaround - not exactly the cleanest kind, but it works nevertheless. Try using some regular expressions as shown below.

a.)For the jack clients named Clementine and/or Clementine-A (where A is typically an integer) as declared by Clementine , you could get patchbay to refer to them by altering

Clementine

with

^Clementine[-][0-9]

This should make patchbay follow clients with names starting with Clementine and with or without hyphens and numbers following it.

b.)For jack plugs named _out_jackaudiosink-X1 and _out_jackaudiosink-X2 whereX typically is a number with digits of unknown lengths, you could hand-edit the two entries to alter

out_jackaudiosink-X_1 out_jackaudiosink-X_2

with

^out_jackaudiosink-[0-9]+_1 ^out_jackaudiosink-[0-9]+_2

respectively.

falsechicken commented 3 years ago

I just started getting into Jack and was looking for an audio player with nice library management and jack support and this looked great but this issue drives me nuts. I use QjackCtl to manage my connections but since Clementine does this QjackCtl cannot keep track of the connections and auto connect them.

falsechicken commented 3 years ago

This is being my problem too, but for use for patchbay specifically (so far), I have come up with a workaround - not exactly the cleanest kind, but it works nevertheless. Try using some regular expressions as shown below.

a.)For the jack clients named Clementine and/or Clementine-A (where A is typically an integer) as declared by Clementine , you could get patchbay to refer to them by altering

Clementine

with

^Clementine[-][0-9]

This should make patchbay follow clients with names starting with Clementine and with or without hyphens and numbers following it.

b.)For jack plugs named _out_jackaudiosink-X1 and _out_jackaudiosink-X2 whereX typically is a number with digits of unknown lengths, you could hand-edit the two entries to alter

out_jackaudiosink-X_1 out_jackaudiosink-X_2

with

^out_jackaudiosink-[0-9]+_1 ^out_jackaudiosink-[0-9]+_2

respectively.

This does seem to work. Thanks!