openmixer — generated API reference
    Preparing search index...

    Function makeSourceFromInput

    • Build a Source patched to a specific AdapterInput, stamping the input's DECLARED head-amp capability (headAmpCapabilityOf) onto Source.headAmp — the honest, capability-driven way to register a source, so the channel it feeds advertises phantom/pad/GAIN iff the backing input (a REAC box, a reac-pw proxy/master/virtual-stagebox port) actually carries them. A genuinely non-REAC input (NO_HEAD_AMP) yields a source that advertises no head-amp controls. Head-amp VALUE defaults follow makeSource; pass init to override name/icon/gain/pad/phantom.

      Parameters

      • id: string

        the source id

      • provider: InputProvider

        the adapter exposing input (its adapterId becomes the patch's)

      • input: AdapterInput

        the enumerated input this source draws from — its *Capable flags are captured

      • init: Partial<Pick<Source, "name" | "icon" | "gainDb" | "pad" | "phantom">> = {}

        optional name / icon / head-amp VALUE overrides (capability comes from input)

      Returns Source

      a fresh source whose headAmp mirrors the input's declared capability