/** @packageDocumentation Audio properties for AIFF/AIFC files. Parses the COMM chunk including optional AIFC compression info. */ import { ByteVector } from "../../byteVector.js"; import { AudioProperties } from "../../audioProperties.js"; import { ReadStyle } from "../../toolkit/types.js"; /** * Audio properties parsed from an AIFF/AIFC `COMM` chunk. * * `COMM` chunk layout (big-endian): * `channels(2)` + `sampleFrames(4)` + `bitsPerSample(2)` * + `sampleRate(10 bytes, IEEE 754 80-bit extended float)` * * For AIFC, additionally: * + `compressionType(4)` + `compressionName(Pascal string)` */ export declare class AiffProperties extends AudioProperties { /** Number of audio channels. */ private _channels; /** Total number of PCM sample frames in the stream. */ private _sampleFrames; /** Bits per sample (bit depth). */ private _bitsPerSample; /** Sample rate in Hz (decoded from the 80-bit IEEE 754 extended float). */ private _sampleRate; /** Byte length of the `"SSND"` sound-data chunk. */ private _streamLength; /** Whether this is an AIFC file (contains a compression type field). */ private _isAifc; /** Four-character compression type identifier (AIFC only, e.g. `"NONE"`, `"sowt"`). */ private _compressionType; /** Human-readable compression name Pascal string (AIFC only). */ private _compressionName; /** * Constructs an {@link AiffProperties} instance by parsing a `COMM` chunk. * @param commData - Raw bytes of the `COMM` chunk (must be at least 18 bytes). * @param streamLength - Byte length of the `"SSND"` chunk. * @param readStyle - Level of detail for property parsing. Defaults to `ReadStyle.Average`. */ constructor(commData: ByteVector, streamLength: number, readStyle?: ReadStyle); /** * Playback duration in milliseconds, derived from `sampleFrames` and `sampleRate`. * @returns Duration in milliseconds, or `0` if `sampleRate` is zero. */ get lengthInMilliseconds(): number; /** * Average bitrate of the stream in kilobits per second. * Matches the C++ calculation: `trunc(streamLength * 8 / preciseLength + 0.5)`. * @returns Bitrate in kbps, or `0` if duration is zero. */ get bitrate(): number; /** * Sample rate of the audio stream in Hz (rounded to the nearest integer). * @returns Sample rate in Hz, or `0` if unknown. */ get sampleRate(): number; /** * Number of audio channels. * @returns Channel count (e.g. `2` for stereo). */ get channels(): number; /** * Bits per sample (bit depth) of the audio stream. * @returns Bit depth (e.g. `16`, `24`). */ get bitsPerSample(): number; /** * Total number of PCM sample frames in the `"SSND"` chunk. * @returns Sample frame count. */ get sampleFrames(): number; /** * Whether this is an AIFC file (the `COMM` chunk contains a compression type field). * @returns `true` for AIFC, `false` for plain AIFF. */ get isAifc(): boolean; /** * Four-character compression type identifier (AIFC only). * Common values: `"NONE"` (uncompressed), `"sowt"` (little-endian PCM), `"fl32"`. * @returns The compression type string, or `""` for plain AIFF. */ get compressionType(): string; /** * Human-readable compression name from the Pascal string in the `COMM` chunk (AIFC only). * @returns The compression name string, or `""` for plain AIFF. */ get compressionName(): string; } //# sourceMappingURL=aiffProperties.d.ts.map