foo-webview-sdk
    Preparing search index...

    Interface AudioGetSpectrumSuccess

    Successful response from audio.getSpectrum.

    interface AudioGetSpectrumSuccess {
        bands?: number;
        channelCount?: number;
        channels?: "mix" | "stereo";
        fftSize: number;
        firstBin?: number;
        hostTime: number;
        left?: number[];
        maxFrequency: number;
        minFrequency: number;
        output: "bands" | "bins";
        right?: number[];
        sampleRate: number;
        scale: "weighted" | "db";
        spectrum?: number[];
        state: "stopped" | "paused" | "playing";
        streamTime: number;
        subscriptionId?: string;
        success: true;
    }
    Index
    bands?: number

    Band frames: length of spectrum.

    channelCount?: number

    Bin frames: channel count of the visualization stream; 0 when unknown.

    channels?: "mix" | "stereo"

    Bin frames: the subscription's channel layout.

    fftSize: number

    FFT size actually used.

    firstBin?: number

    Bin frames: FFT bin index of the first value; value i is centred at (firstBin + i) * sampleRate / fftSize Hz. 0, with empty arrays, when the range holds no bin.

    hostTime: number

    Host system time when the frame was computed, Unix epoch milliseconds.

    left?: number[]

    Bin frames with channels: 'stereo': the first channel, one dB value per bin.

    maxFrequency: number

    Upper edge in Hz: the requested one capped at sampleRate / 2, or sampleRate / 2 when none was given.

    minFrequency: number

    Lower edge of the frequency range in Hz.

    output: "bands" | "bins"

    Output data format contained in this frame.

    right?: number[]

    Bin frames with channels: 'stereo': the second channel, or the first again for a mono stream.

    sampleRate: number

    Sample rate of the visualization stream in Hz; 0 when unknown.

    scale: "weighted" | "db"

    Scale of the values; always db for bin frames.

    spectrum?: number[]

    Band frames: one value per band in the frame's scale; weighted values lie in [0, 1], db values have a floor of -160. Bin frames with channels: 'mix': one power value in dB per bin.

    state: "stopped" | "paused" | "playing"

    Paused or stopped frames are silence.

    streamTime: number

    Seconds since the visualization stream last started; the frame is computed from the fftSize samples ending at this time.

    subscriptionId?: string

    Subscription the frame belongs to; absent when the request named none.

    success: true

    Always true here; a failed call resolves with ApiFailure instead.