import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode"; import { NormalRange, PowerOfTwo } from "../../core/type/Units"; export declare type AnalyserType = "fft" | "waveform"; export interface AnalyserOptions extends ToneAudioNodeOptions { size: PowerOfTwo; type: AnalyserType; smoothing: NormalRange; } /** * Wrapper around the native Web Audio's [AnalyserNode](http://webaudio.github.io/web-audio-api/#idl-def-AnalyserNode). * Extracts FFT or Waveform data from the incoming signal. * @category Component */ export declare class Analyser extends ToneAudioNode { readonly name: string; readonly input: AnalyserNode; readonly output: AnalyserNode; /** * The analyser node. */ private _analyser; /** * The analysis type */ private _type; /** * The buffer that the FFT data is written to */ private _buffer; /** * @param type The return type of the analysis, either "fft", or "waveform". * @param size The size of the FFT. This must be a power of two in the range 16 to 16384. */ constructor(type?: AnalyserType, size?: number); constructor(options?: Partial); static getDefaults(): AnalyserOptions; /** * Run the analysis given the current settings and return the */ getValue(): Float32Array; /** * The size of analysis. This must be a power of two in the range 16 to 16384. */ size: PowerOfTwo; /** * The analysis function returned by analyser.getValue(), either "fft" or "waveform". */ type: AnalyserType; /** * 0 represents no time averaging with the last analysis frame. */ smoothing: NormalRange; /** * Clean up. */ dispose(): this; }