WebStudio/src/worklet.d.ts
2020-04-19 15:47:19 +02:00

23 lines
524 B
TypeScript

declare module "*.worklet.ts" {
const exportString: string;
export default exportString;
}
interface AudioWorkletProcessor {
readonly port: MessagePort;
process(
inputs: Float32Array[][],
outputs: Float32Array[][],
parameters: Record<string, Float32Array>
): void;
}
declare var AudioWorkletProcessor: {
prototype: AudioWorkletProcessor;
new (options?: AudioWorkletNodeOptions): AudioWorkletProcessor;
};
declare function registerProcessor(
name: string,
processor: AudioWorkletProcessor
);