sound-visualizer
Version:
22 lines (19 loc) • 691 B
TypeScript
import { DrawCurrentOptions } from './draw/options.js';
import '../common/draw/options.js';
/**
* Sets up a current sound visualizer.
*
* @impure this function returns impure functions.
*
* @param audio the audio to visualize.
* @param canvas the canvas to draw to.
* @param drawOptions additional options for the sound visualizer. See the `DrawCurrentOptions` type.
*
* @returns functions used to visualize the audio. See the `VisualizerFunctions` type.
**/
declare function currentVisualizer(audio: MediaStream, canvas: HTMLCanvasElement, drawOptions?: DrawCurrentOptions): {
start: () => void;
stop: () => void;
reset: () => void;
};
export { currentVisualizer };