/** * Apple CoreAudio Format (CAF) reader and writer. * * CAF exists because AIFF and WAV both cap out at 4 GB — their sizes are 32-bit. * CAF uses 64-bit chunk sizes, so it is what Logic, Final Cut, and macOS * recording tools produce for long or high-resolution material. * * Chunk sizes here are 64-bit *signed*, and -1 is a legal "size unknown, runs to * end of file" marker. That sentinel has to be handled explicitly, or it becomes * an enormous unsigned length and a bounds check that never fires. */ import { type Limits } from '../limits.js'; import type { DecodedContainer, ContainerEncodeOptions } from './types.js'; export interface CafDecodeOptions { limits?: Partial; } /** Decodes an Apple CoreAudio Format file. */ export declare function decodeCaf(input: Uint8Array, options?: CafDecodeOptions): DecodedContainer; /** Encodes planar float channels as a CAF file. */ export declare function encodeCaf(channelData: readonly Float32Array[], sampleRate: number, options?: ContainerEncodeOptions): Uint8Array;