|
@@ -3635,16 +3635,25 @@ class Host(object):
|
|
|
|
|
|
|
|
def _fix_host_connection_port(self, port):
|
|
def _fix_host_connection_port(self, port):
|
|
|
"""Map URL style port names to Jack port names."""
|
|
"""Map URL style port names to Jack port names."""
|
|
|
|
|
+ # Rigforge bare boundary port alias; web_connect removes /graph/.
|
|
|
|
|
+ if port in self.rigforge_capture_ports:
|
|
|
|
|
+ return self.rigforge_capture_ports[port]
|
|
|
|
|
+ if port in self.rigforge_playback_ports:
|
|
|
|
|
+ return self.rigforge_playback_ports[port]
|
|
|
data = port.split("/")
|
|
data = port.split("/")
|
|
|
|
|
+ if len(data) == 2 and data[0] == "" and (
|
|
|
|
|
+ data[1] in self.rigforge_capture_ports
|
|
|
|
|
+ or data[1] in self.rigforge_playback_ports
|
|
|
|
|
+ ):
|
|
|
|
|
+ symbol = data[1]
|
|
|
|
|
+ return self.rigforge_capture_ports.get(
|
|
|
|
|
+ symbol, self.rigforge_playback_ports.get(symbol)
|
|
|
|
|
+ )
|
|
|
# For example, "/graph/capture_2" becomes ['', 'graph', 'capture_2'].
|
|
# For example, "/graph/capture_2" becomes ['', 'graph', 'capture_2'].
|
|
|
# Plugin paths can be longer, e.g. ['', 'graph', 'BBCstereo', 'inR']
|
|
# Plugin paths can be longer, e.g. ['', 'graph', 'BBCstereo', 'inR']
|
|
|
|
|
|
|
|
if len(data) == 3:
|
|
if len(data) == 3:
|
|
|
# Handle special cases
|
|
# Handle special cases
|
|
|
- if data[2] in self.rigforge_capture_ports:
|
|
|
|
|
- return self.rigforge_capture_ports[data[2]]
|
|
|
|
|
- if data[2] in self.rigforge_playback_ports:
|
|
|
|
|
- return self.rigforge_playback_ports[data[2]]
|
|
|
|
|
if data[2] == "serial_midi_in":
|
|
if data[2] == "serial_midi_in":
|
|
|
return "ttymidi:MIDI_in"
|
|
return "ttymidi:MIDI_in"
|
|
|
if data[2] == "serial_midi_out":
|
|
if data[2] == "serial_midi_out":
|
|
@@ -4381,7 +4390,29 @@ class Host(object):
|
|
|
if self.connections is not connection_list:
|
|
if self.connections is not connection_list:
|
|
|
return
|
|
return
|
|
|
|
|
|
|
|
- if connect_link(*pipewire_link):
|
|
|
|
|
|
|
+ if not (
|
|
|
|
|
+ self.rigforge_capture_ports
|
|
|
|
|
+ and self.rigforge_playback_ports
|
|
|
|
|
+ and len(self.audioportsIn) == len(self.rigforge_capture_ports)
|
|
|
|
|
+ and len(self.audioportsOut) == len(self.rigforge_playback_ports)
|
|
|
|
|
+ ):
|
|
|
|
|
+ ready = False
|
|
|
|
|
+ else:
|
|
|
|
|
+ result = subprocess.run(
|
|
|
|
|
+ ["pw-link", "-o"],
|
|
|
|
|
+ check=False,
|
|
|
|
|
+ capture_output=True,
|
|
|
|
|
+ text=True,
|
|
|
|
|
+ )
|
|
|
|
|
+ ready = result.returncode == 0 and all(
|
|
|
|
|
+ port in result.stdout.splitlines()
|
|
|
|
|
+ for port in (
|
|
|
|
|
+ *self.rigforge_capture_ports.values(),
|
|
|
|
|
+ *self.rigforge_playback_ports.values(),
|
|
|
|
|
+ )
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ if ready and connect_link(*pipewire_link):
|
|
|
edge = (port_from, port_to)
|
|
edge = (port_from, port_to)
|
|
|
if edge not in connection_list:
|
|
if edge not in connection_list:
|
|
|
connection_list.append(edge)
|
|
connection_list.append(edge)
|