|
@@ -247,9 +247,45 @@ def apply(source_root):
|
|
|
)
|
|
)
|
|
|
replace_once(
|
|
replace_once(
|
|
|
app / "mod" / "host.py",
|
|
app / "mod" / "host.py",
|
|
|
- ''' self.send_notmodified("connect %s %s" % (port_from_2, port_to_2))
|
|
|
|
|
- self.connections.append((port_from, port_to))
|
|
|
|
|
|
|
+ ''' def load_pb_connections(self, connections, mappedOldMidiIns, mappedOldMidiOuts,
|
|
|
|
|
+ mappedNewMidiIns, mappedNewMidiOuts):
|
|
|
''',
|
|
''',
|
|
|
|
|
+ ''' def _rigforge_restore_pipewire_boundary(
|
|
|
|
|
+ self, pipewire_link, port_from, port_to, connection_list, attempts_left
|
|
|
|
|
+ ):
|
|
|
|
|
+ if self.connections is not connection_list:
|
|
|
|
|
+ return
|
|
|
|
|
+
|
|
|
|
|
+ if connect_link(*pipewire_link):
|
|
|
|
|
+ edge = (port_from, port_to)
|
|
|
|
|
+ if edge not in connection_list:
|
|
|
|
|
+ connection_list.append(edge)
|
|
|
|
|
+ self.msg_callback("connect %s %s" % (port_from, port_to))
|
|
|
|
|
+ return
|
|
|
|
|
+
|
|
|
|
|
+ if attempts_left <= 1:
|
|
|
|
|
+ logging.error(
|
|
|
|
|
+ "[host] PipeWire backend failed to restore ports: '%s' => '%s'",
|
|
|
|
|
+ pipewire_link[0], pipewire_link[1]
|
|
|
|
|
+ )
|
|
|
|
|
+ return
|
|
|
|
|
+
|
|
|
|
|
+ IOLoop.instance().call_later(
|
|
|
|
|
+ 0.5,
|
|
|
|
|
+ self._rigforge_restore_pipewire_boundary,
|
|
|
|
|
+ pipewire_link,
|
|
|
|
|
+ port_from,
|
|
|
|
|
+ port_to,
|
|
|
|
|
+ connection_list,
|
|
|
|
|
+ attempts_left - 1
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ def load_pb_connections(self, connections, mappedOldMidiIns, mappedOldMidiOuts,
|
|
|
|
|
+ mappedNewMidiIns, mappedNewMidiOuts):
|
|
|
|
|
+''',
|
|
|
|
|
+ )
|
|
|
|
|
+ replace_if_present(
|
|
|
|
|
+ app / "mod" / "host.py",
|
|
|
''' pipewire_link = self._rigforge_pipewire_boundary(port_from, port_to)
|
|
''' pipewire_link = self._rigforge_pipewire_boundary(port_from, port_to)
|
|
|
if pipewire_link is not None:
|
|
if pipewire_link is not None:
|
|
|
if not connect_link(*pipewire_link, retries=60, retry_interval=0.1):
|
|
if not connect_link(*pipewire_link, retries=60, retry_interval=0.1):
|
|
@@ -261,6 +297,38 @@ def apply(source_root):
|
|
|
else:
|
|
else:
|
|
|
self.send_notmodified("connect %s %s" % (port_from_2, port_to_2))
|
|
self.send_notmodified("connect %s %s" % (port_from_2, port_to_2))
|
|
|
self.connections.append((port_from, port_to))
|
|
self.connections.append((port_from, port_to))
|
|
|
|
|
+''',
|
|
|
|
|
+ ''' pipewire_link = self._rigforge_pipewire_boundary(port_from, port_to)
|
|
|
|
|
+ if pipewire_link is not None:
|
|
|
|
|
+ self._rigforge_restore_pipewire_boundary(
|
|
|
|
|
+ pipewire_link,
|
|
|
|
|
+ port_from,
|
|
|
|
|
+ port_to,
|
|
|
|
|
+ self.connections,
|
|
|
|
|
+ attempts_left=60
|
|
|
|
|
+ )
|
|
|
|
|
+ continue
|
|
|
|
|
+ self.send_notmodified("connect %s %s" % (port_from_2, port_to_2))
|
|
|
|
|
+ self.connections.append((port_from, port_to))
|
|
|
|
|
+''',
|
|
|
|
|
+ )
|
|
|
|
|
+ replace_once(
|
|
|
|
|
+ app / "mod" / "host.py",
|
|
|
|
|
+ ''' self.send_notmodified("connect %s %s" % (port_from_2, port_to_2))
|
|
|
|
|
+ self.connections.append((port_from, port_to))
|
|
|
|
|
+''',
|
|
|
|
|
+ ''' pipewire_link = self._rigforge_pipewire_boundary(port_from, port_to)
|
|
|
|
|
+ if pipewire_link is not None:
|
|
|
|
|
+ self._rigforge_restore_pipewire_boundary(
|
|
|
|
|
+ pipewire_link,
|
|
|
|
|
+ port_from,
|
|
|
|
|
+ port_to,
|
|
|
|
|
+ self.connections,
|
|
|
|
|
+ attempts_left=60
|
|
|
|
|
+ )
|
|
|
|
|
+ continue
|
|
|
|
|
+ self.send_notmodified("connect %s %s" % (port_from_2, port_to_2))
|
|
|
|
|
+ self.connections.append((port_from, port_to))
|
|
|
''',
|
|
''',
|
|
|
)
|
|
)
|
|
|
replace_once(
|
|
replace_once(
|