import type { AudioTrack } from "../types"; import { type PCMFrame } from "./SoftwareAudioDecoder"; import { WasmBindings } from "../wasm/bindings"; export declare class MoviAudioDecoder { private decoder; private swDecoder; private bindings; private useSoftware; private pendingData; private pendingPCM; private pendingChunks; private isConfigured; private onData; private onPCM; private onError; private currentTrack; private hasTriedSoftwareFallback; private hasDescription; private _downmix; constructor(); setDownmix(downmix: boolean): void; setBindings(bindings: WasmBindings): void; /** True when audio runs through the WASM software decoder (TrueHD/DTS/AC-3/ * Opus/FLAC/…) rather than WebCodecs. The software path decodes sub-realtime * on a cold start, so callers can gate cold-start mitigations on this. */ get usesSoftware(): boolean; /** * Configure the decoder for a specific track */ configure(track: AudioTrack, extradata?: Uint8Array): Promise; private needsSoftwareDecoding; private initSoftwareDecoder; /** * Map FFmpeg codec names to WebCodecs codec strings */ private mapCodecToWebCodecs; /** * Decode an encoded audio chunk */ decode(data: Uint8Array, timestamp: number, keyframe: boolean): void; /** * Set data output callback */ setOnData(callback: (data: AudioData) => void): void; /** * Set PCM frame output callback (used by the software decoder path). */ setOnPCM(callback: (frame: PCMFrame) => void): void; /** * Set error callback */ setOnError(callback: (error: Error) => void): void; /** * Flush the decoder */ flush(): Promise; /** * Reset the decoder */ reset(): void; /** * Close the decoder */ close(): void; /** * Check if decoder is configured */ get configured(): boolean; /** * Get queue size */ get queueSize(): number; /** * Get decoder stats for nerd stats overlay */ getStats(): { decoderType: string; queueSize: number; }; /** * Strip ADTS header from AAC packet data if present. * ADTS header is 7 bytes (without CRC) or 9 bytes (with CRC). * Sync word: 0xFFF (12 bits). */ private static stripAdtsHeader; } //# sourceMappingURL=AudioDecoder.d.ts.map