export type InitMessage = {
    type: 'init';
    wasmMemory: WebAssembly.Memory;
    stackPtr: number;
};
export type StartMessage = {
    type: 'start';
};
export type DestroyMessage = {
    type: 'destroy';
};
export type ReadyRespose = {
    type: 'ready';
};
export type StoppedResponse = {
    type: 'stopped';
};
export type DoneResponse = {
    type: 'done';
};
export type InitInferenceWorkerMessage = {
    type: 'initInferenceWorker';
    wasmMemory: WebAssembly.Memory;
    stackPtr: number;
    threadPtr: number;
};
export type RegisterProcessorMessage = {
    type: 'registerProcessor';
    processorPtr: number;
    className?: string;
    inferenceConfigPtr?: number;
};
export type ProcessorRegisteredResponse = {
    type: 'processorRegistered';
};
export type UnregisterProcessorMessage = {
    type: 'unregisterProcessor';
    processorPtr: number;
};
export type ProcessorUnregisteredResponse = {
    type: 'processorUnregistered';
};
export type InferenceWorkerMessage = InitInferenceWorkerMessage | RegisterProcessorMessage | UnregisterProcessorMessage | StartMessage | DestroyMessage;
export type AudioWorkletIOConfig = {
    maxBufferSize: number;
    inputNodeIndex: number;
    outputNodeIndex: number;
    inputChannels: number;
    outputChannels: number;
};
export type AudioWorkletConfigureMessage = {
    type: 'configure';
    wasmMemory: WebAssembly.Memory;
    wasmBinary: ArrayBuffer;
    stackPtr: number;
    inferenceHandlerPtr: number;
    prePostProcessorPtr: number;
    inputBufferPtr: number;
    outputBufferPtr: number;
    inputDataBuffer: number;
    outputDataBuffer: number;
    ioConfig: AudioWorkletIOConfig;
};
/**
 * Resolve once `worker` posts a message whose `data.type` matches
 * `messageType`. The listener is registered for the duration of the
 * wait and removed as soon as the matching message arrives.
 *
 * Used to await the handshake responses (`'ready'`,
 * `'processorRegistered'`, `'stopped'`, …) that anira's worker
 * runtime emits during setup. Messages whose `type` does not match
 * are ignored and left for other listeners.
 *
 * @param worker - The target worker (or any object with the
 *   `addEventListener` / `removeEventListener` `'message'` surface).
 * @param messageType - Value of `data.type` to wait for.
 * @returns A promise that resolves when the matching message is received.
 */
export declare const waitForWorkerMessage: (worker: Pick<Worker, "addEventListener" | "removeEventListener">, messageType: string) => Promise<void>;
//# sourceMappingURL=messages.d.ts.map