openmixer — generated API reference
    Preparing search index...

    Function collapsePhysicalInputs

    • Collapse a stored input-patch set to at most one physical input — the load-time migration for the settled one-physical-input-per-channel rule (see InputPatchbay). A pre-rule session could persist several physical inputs summed at one channel head (the observed "In 7 + In 15" bug, where a phantom toggle lit only the first); this keeps the FIRST physical input and drops every later one — summing physical preamps is a bus's job, not a channel's. Non-physical entries (app / internal PipeWire streams) pass through untouched, so a legitimate single non-physical source and the primary's order are preserved. isPhysical decides which port is a physical input (the caller supplies the device-specific predicate — a reac-capture port, a hardware capture, …), keeping this pure and device-neutral. Order-stable; returns the same reference-shaped entries.

      Type Parameters

      • T extends { l: string }

      Parameters

      • sources: readonly T[]

        the stored ordered source set ([primary, ...extras])

      • isPhysical: (port: string) => boolean

        whether a port name is a physical input's port

      Returns T[]

      the collapsed set — at most one physical input, other entries kept in order