Pick the sink the main mix should auto-route to, from the patchbay's enumerated
sinks: the host's default sink when it is enumerated, else the first local-hardware
sink, else the first sink at all. avoidIds excludes the demo's own virtual nodes
(their loopback sink sides are enumerated as patchable sinks — auto-routing the main
into one of them would just re-create the no-consumer loop). Portless nodes are
never picked (nothing to pw-link to). Returns undefined when no eligible sink
exists (CI / headless), so the caller can skip cleanly.
Pick the sink the main mix should auto-route to, from the patchbay's enumerated sinks: the host's default sink when it is enumerated, else the first local-hardware sink, else the first sink at all.
avoidIdsexcludes the demo's own virtual nodes (their loopback sink sides are enumerated as patchable sinks — auto-routing the main into one of them would just re-create the no-consumer loop). Portless nodes are never picked (nothing topw-linkto). Returnsundefinedwhen no eligible sink exists (CI / headless), so the caller can skip cleanly.