Member Junction
    Preparing search index...

    Construction options for PcmFramePump.

    interface PcmFramePumpOptions {
        Clock?: PumpClock;
        DuckLevel?: number;
        DuckMs?: number;
        FrameMs?: number;
        LeadMs?: number;
        Loop?: boolean;
        Music: Int16Array;
        OnEnded?: (reason: PumpEndReason) => void;
        SampleRate: number;
        Sink: (frame: Int16Array<ArrayBuffer>) => void;
    }
    Index

    Properties

    Clock?: PumpClock

    Time source. Default: SystemPumpClock.

    DuckLevel?: number

    The music's level while a clip plays, 0–1. Default 0.15.

    DuckMs?: number

    How long the music takes to fade down for a clip (and back up after), in ms. Default 150.

    FrameMs?: number

    Frame duration in ms. Default 20.

    LeadMs?: number

    How far ahead of real time the pump keeps the sink, in ms. Default 150.

    Loop?: boolean

    Loop Music forever. Default true.

    Music: Int16Array

    Mono PCM16 to play, at SampleRate. Must not be empty.

    OnEnded?: (reason: PumpEndReason) => void

    Called once when the pump stops, with the reason.

    SampleRate: number

    The rate of Music, of inserted clips, and of the frames handed to Sink.

    Sink: (frame: Int16Array<ArrayBuffer>) => void

    Receives each frame. Every frame is a freshly allocated array the sink may keep.