/** * AIFF and AIFF-C reader and writer. * * Apple's answer to WAV, and structurally its mirror image: the same * chunk-plus-size layout, but big-endian throughout, with the sample rate stored * as an 80-bit extended float — a format essentially nothing else in computing * still uses. * * AIFF-C adds a compression identifier. The one that catches people out is * `sowt` ("twos" backwards), which means *little-endian* PCM inside a big-endian * container. It is what macOS writes by default, so any reader that assumes * big-endian samples plays real-world Apple files as loud static. */ import { Reader } from '../io/reader.js'; import { type Limits } from '../limits.js'; import type { DecodedContainer, ContainerEncodeOptions } from './types.js'; /** Reads a Pascal string (length byte, then bytes, padded to even). */ declare function pascalString(r: Reader): string; export interface AiffDecodeOptions { limits?: Partial; } /** Decodes an AIFF or AIFF-C file. */ export declare function decodeAiff(input: Uint8Array, options?: AiffDecodeOptions): DecodedContainer; export interface AiffEncodeOptions extends ContainerEncodeOptions { /** * Write AIFF-C instead of plain AIFF. Forced on for float and companded * formats, which classic AIFF cannot express. */ aifc?: boolean; } /** Encodes planar float channels as AIFF or AIFF-C. */ export declare function encodeAiff(channelData: readonly Float32Array[], sampleRate: number, options?: AiffEncodeOptions): Uint8Array; /** Exposed for the AIFF tests; not part of the public surface. */ export declare const __internal: { pascalString: typeof pascalString; }; export {}; //# sourceMappingURL=aiff.d.ts.map