foo-webview-sdk
    Preparing search index...

    Interface AudioGenerateFullWaveformParams

    Parameters for audio.generateFullWaveform. Compute a waveform of a whole track. A cache hit answers ready with the waveform; otherwise the answer is pending with a task id, and the result arrives as audio:fullWaveformReady or audio:fullWaveformFailed.

    interface AudioGenerateFullWaveformParams {
        cueIndex?: number;
        method?: "rms" | "peak";
        path: string;
        preferCache?: boolean;
        resolution?: number;
        scale?: "linear" | "db";
        signed?: boolean;
    }
    Index
    cueIndex?: number

    Subsong index, 0-based; takes precedence over a subsong in path.

    method?: "rms" | "peak"

    How each point is taken.

    "rms"
    
    path: string

    Track path; a |subsong:N suffix selects a subsong.

    preferCache?: boolean

    Answer from the cache when possible.

    true
    
    resolution?: number

    Waveform point resolution, clamped to 64..4096. Audio is decoded once per resolution; subsequent variations are computed from cache.

    256
    
    scale?: "linear" | "db"

    Scale of the points: linear, or db, where 60 dB below the track's own maximum maps to 0. Ignored when signed is set.

    "linear"
    
    signed?: boolean

    Keep PCM polarity; points fall in [-1, 1].

    false