/** @packageDocumentation FLAC audio properties parsed from the STREAMINFO metadata block. */ import { AudioProperties } from "../audioProperties.js"; import { ByteVector } from "../byteVector.js"; import { ReadStyle } from "../toolkit/types.js"; /** * FLAC audio properties, parsed from the STREAMINFO metadata block. * * STREAMINFO layout (34 bytes minimum): * minBlockSize(2) + maxBlockSize(2) + minFrameSize(3) + maxFrameSize(3) + * sampleRate:20 | channels-1:3 | bitsPerSample-1:5 | totalSamplesHigh:4 (4 bytes) + * totalSamplesLow(4) + md5Signature(16) */ export declare class FlacProperties extends AudioProperties { /** Track duration in milliseconds. */ private _lengthInMs; /** Approximate bitrate in kbit/s, derived from stream length and sample count. */ private _bitrate; /** Sample rate in Hz. */ private _sampleRate; /** Number of bits per sample. */ private _bitsPerSample; /** Number of audio channels. */ private _channels; /** Total number of inter-channel sample frames in the stream. */ private _sampleFrames; /** MD5 signature of the uncompressed audio data (16 bytes). */ private _signature; /** * Constructs FLAC audio properties from a STREAMINFO block. * @param streamInfoData Raw bytes of the STREAMINFO block payload (at least 18 bytes). * @param streamLength Total byte length of the audio stream (used to estimate bitrate). * @param readStyle Read style hint (passed to the base class). */ constructor(streamInfoData: ByteVector, streamLength: number, readStyle?: ReadStyle); /** Track duration in milliseconds. */ get lengthInMilliseconds(): number; /** Approximate bitrate in kbit/s. */ get bitrate(): number; /** Sample rate in Hz. */ get sampleRate(): number; /** Number of audio channels. */ get channels(): number; /** Number of bits per sample. */ get bitsPerSample(): number; /** Total number of inter-channel sample frames in the stream. */ get sampleFrames(): bigint; /** MD5 signature of the uncompressed audio stream. */ get signature(): ByteVector; /** * Parses the STREAMINFO block payload and populates all property fields. * @param data Raw bytes of the STREAMINFO block (at least 18 bytes, big-endian). * @param streamLength Total byte length of the audio stream, used to derive bitrate. */ private read; } //# sourceMappingURL=flacProperties.d.ts.map