import { AniraWeb } from '../AniraWeb';
import { InferenceHandler, JSPrePostProcessor } from '../wrappers';
import { AudioWorkletIOConfig } from './messages';
export type AniraWorkletState = {
    wasmMemory: WebAssembly.Memory;
    aniraWeb: AniraWeb;
    inferenceHandler: InferenceHandler;
    prePostProcessorPtr: number;
    inputBufferPtr: number;
    outputBufferPtr: number;
    inputDataBuffer: number;
    outputDataBuffer: number;
    ioConfig: AudioWorkletIOConfig;
    inputChannelViews: Float32Array[];
    outputChannelViews: Float32Array[];
};
export declare class AniraAudioWorkletBase extends AudioWorkletProcessor {
    protected aniraState: AniraWorkletState | null;
    protected prePostRegistry: Map<number, JSPrePostProcessor>;
    private clearOutputs;
    constructor(options?: AudioWorkletNodeOptions);
    protected onConfigured(_state: AniraWorkletState): Promise<void>;
    /**
     * Copy a slice of `inputNode` channels into a contiguous range of
     * `inputChannelViews`. Missing source channels are zero-filled.
     */
    protected copyAudioInputsToChannels(inputNode: Float32Array[] | undefined, state: AniraWorkletState, bufferSize: number, channelOffset?: number, channelCount?: number): void;
    /**
     * Copy a contiguous range of `outputChannelViews` back into `outputNode`.
     * No-op if no output node is connected or no samples were produced.
     */
    protected copyAudioOutputsFromChannels(outputNode: Float32Array[] | undefined, state: AniraWorkletState, samplesProcessed: number, channelOffset?: number, channelCount?: number): void;
    /**
     * Build the `float***` pointer structure that `processMulti` expects, by
     * slicing the existing `inputBufferPtr` / `outputBufferPtr` (both already
     * `float**`s of channel pointers laid out contiguously by
     * `configureAudioWorklet`).
     *
     * `channelsPerTensor` describes how the contiguous channel range is split
     * across tensors — e.g. `[2, 1]` means tensor 0 owns channels 0–1 and
     * tensor 1 owns channel 2. Also allocates a `size_t[numTensors]` array
     * for per-tensor sample counts.
     */
    protected buildMultiTensorPointers(direction: 'input' | 'output', channelsPerTensor: number[]): {
        tensorPtrs: number;
        numSamplesPtr: number;
    };
    protected processAudioBlock(inputs: Float32Array[][], outputs: Float32Array[][], state: AniraWorkletState, bufferSize: number, _parameters: Record<string, Float32Array>): void;
    process(inputs: Float32Array[][], outputs: Float32Array[][], parameters: Record<string, Float32Array>): boolean;
}
//# sourceMappingURL=worklet-base.d.ts.map