openmixer — generated API reference
    Preparing search index...

    Function resolveTap

    • Resolve a SendTapSpec against a live channel chain to a ResolvedTap.

      • Explicit position { position: k } → the processor at clamp(k, 0, len-1).
      • Preset / legacy → the preset's anchor (see PRESET_ANCHOR). When the anchor is present: a "Post-X" taps X's output (its index), a "Pre-X" taps the output of whatever sits immediately before X (index-1). Post-All always taps the last processor. When the anchor is absent, the tap falls through to the output of the last present processor that canonically precedes the missing anchor (the "previous processor's output" rule) — always a valid port; an empty chain throws (a channel always has at least the fader).

      This is what makes a tap robust to reorder and to absent stages: the same preset on a reordered chain resolves to a different index (the new position of its anchor), and on a chain missing the anchor it resolves to the nearest upstream output — never a dangling port.

      Parameters

      • chain: readonly Processor[]

        the live ordered processor list

      • tap: SendTapSpec

        the tap spec (preset, legacy string, or explicit position)

      • set: TapPointSet = DEFAULT_TAP_POINTS

      Returns ResolvedTap

      the resolved tap (index + processor + fell-through flag)

      if the chain is empty (no processor to tap)