Member Junction
    Preparing search index...

    Paces mono PCM16 out to a sink in real time. See the file overview.

    Index

    Constructors

    Accessors

    • get QueuedAheadMs(): number

      How much already-sent audio is still ahead of real time, in ms: the pump keeps the sink up to LeadMs ahead, so after the last frame is sent the room is still playing this much. Zero once real time has caught up.

      Returns number

    Methods

    • Plays pcm over the music: the music fades down to the duck level, the clip plays, the music fades back up. Clips queue behind one another.

      Parameters

      • pcm: Int16Array

        Mono PCM16 at the pump's sample rate.

      Returns Promise<boolean>

      Resolves true once the clip has been sent in full, false if the pump stopped first or the clip is empty.