foo-webview-sdk
    Preparing search index...

    Type Alias SpectrumSubscribeOutcome

    SpectrumSubscribeOutcome:
        | {
            backgroundThrottle: boolean;
            bands: number;
            channels: SpectrumChannels;
            fftSize: number;
            fps: number;
            maxFrequency: number
            | null;
            minFrequency: number;
            ok: true;
            output: SpectrumOutput;
            scale: SpectrumScale;
            streamReady: boolean;
            subscriptionId: string;
        }
        | { code: string; error?: string; ok: false }

    Settled value of SpectrumSubscription.ready: whether the host registered the subscription, with the values it registered.

    Type Declaration

    • {
          backgroundThrottle: boolean;
          bands: number;
          channels: SpectrumChannels;
          fftSize: number;
          fps: number;
          maxFrequency: number | null;
          minFrequency: number;
          ok: true;
          output: SpectrumOutput;
          scale: SpectrumScale;
          streamReady: boolean;
          subscriptionId: string;
      }
      • backgroundThrottle: boolean
      • bands: number

        Band count after clamping to [8, fftSize / 2].

      • channels: SpectrumChannels
      • fftSize: number

        Requested FFT size; frames report the size actually used.

      • fps: number

        Frame rate after clamping to [1, 60].

      • maxFrequency: number | null

        Requested upper edge in Hz; null when the range follows half the stream's sample rate. Frames report the edge actually used.

      • minFrequency: number

        Lower edge of the band range in Hz, as requested.

      • ok: true
      • output: SpectrumOutput

        Output the host registered. Hosts without bin output report 'bands' whatever was requested; the subscription then receives no frames when bins were asked for.

      • scale: SpectrumScale
      • streamReady: boolean

        true once the visualisation stream exists, which includes the stopped state; whether audio flows shows in the frames' state.

      • subscriptionId: string
    • { code: string; error?: string; ok: false }
      • code: string

        INVALID_PARAMS for rejected parameters, NOT_SUPPORTED when no host is available, UNKNOWN_ERROR when the call itself failed.

      • Optionalerror?: string
      • ok: false