import type { MoviWasmModule } from "../wasm/types"; /** * Ensure the movi WASM module is loaded. Single-flight, shared with the * FFmpeg pipeline. Returns null if loading fails so the caller can fall back * to a different stretcher. */ export declare function loadSignalsmith(): Promise; /** * SoundTouch-shaped facade around movi's Signalsmith Stretch API. * Stereo only — AudioRenderer always upmixes to interleaved 2-channel before * calling, matching the SoundTouch / Rubberband paths. */ export declare class SignalsmithStretcher { private mod; private handle; private channels; private inPtr; private outPtr; private inCapacityFrames; private outCapacityFrames; private pendingInput; private pendingInputFrames; private lastOutputFrames; private _tempo; private _pitch; readonly inputBuffer: { putSamples: (samples: Float32Array, position?: number, numFrames?: number) => void; }; readonly outputBuffer: { readonly frameCount: number; receiveSamples: (output: Float32Array, numFrames: number) => void; }; constructor(mod: MoviWasmModule, sampleRate: number, channels?: number); set tempo(t: number); get tempo(): number; set pitch(p: number); get pitch(): number; /** * SoundTouch's `process()` is a no-op trigger. We defer the actual WASM * call to receiveSamples() so we know the requested output size, which * Signalsmith needs upfront (it doesn't auto-buffer like SoundTouch). * Setting lastOutputFrames here gives the caller's frameCount check the * correct value before they call receiveSamples. */ process(): void; clear(): void; destroy(): void; private stashInput; /** * Lazily allocate / regrow a WASM heap buffer for `frames * channels` * float samples. Returns the pointer. */ private ensureBuffer; private runProcessIfNeeded; } /** * Convenience: load the WASM module + construct a stretcher in one call. */ export declare function createSignalsmithStretcher(sampleRate: number, channels?: number): Promise; //# sourceMappingURL=signalsmith.d.ts.map