foo-webview-sdk
    Preparing search index...

    Interface AudioFullWaveformReadyPayload

    Payload of the audio:fullWaveformReady event. An audio.generateFullWaveform request that answered pending finished decoding. Every request waiting on the same decode gets its own event, rendered with its own method, scale and signed. Sent to the page that made the request, or to a page under the same top-level window when that one cannot be found, or else to the main window's page.

    interface AudioFullWaveformReadyPayload {
        cached: boolean;
        channels: number;
        duration: number;
        maxAmplitude: number;
        method: "rms" | "peak";
        path: string;
        resolution: number;
        sampleRate: number;
        scale: "linear" | "db";
        signed: boolean;
        taskId: string;
        waveform: number[];
    }
    Index
    cached: boolean

    Always false: this event only follows a decode.

    channels: number

    Actual decoded PCM channel count.

    duration: number

    Track duration in seconds.

    maxAmplitude: number

    The largest value of the selected sequence before normalisation, in linear full-scale units: with linear, waveform[i] * maxAmplitude is the absolute level; with db, dBFS is (v * 60 - 60) + 20 * log10(maxAmplitude).

    method: "rms" | "peak"

    How each point was aggregated, as requested.

    path: string

    Source track path specified in the request.

    resolution: number

    Number of points.

    sampleRate: number

    Actual decoded PCM sample rate in Hz, which can differ from the file's nominal sample rate.

    scale: "linear" | "db"

    Scale of the points, as requested.

    signed: boolean

    The points keep PCM polarity, as requested.

    taskId: string

    Id from the pending answer.

    waveform: number[]

    One value per point, in scale; in [-1, 1] when signed, else in [0, 1].