/** @packageDocumentation FLAC-in-OGG file format handler. Reads and writes XiphComment tags and FLAC audio properties. */ import { IOStream } from "../../toolkit/ioStream.js"; import { ReadStyle } from "../../toolkit/types.js"; import { XiphComment } from "../xiphComment.js"; import { OggFile } from "../oggFile.js"; import { FlacProperties } from "../../flac/flacProperties.js"; /** * Implementation of a FLAC-in-OGG file. * * Packet 0 layout: * 0x7F + "FLAC"(4) + majorVersion(1) + minorVersion(1) + * numberOfHeaderPackets(2 BE) + "fLaC"(4) + STREAMINFO block * * STREAMINFO metadata block header: blockType(1, upper bit = last-block flag) + * blockLength(3 BE) + STREAMINFO data. * * Subsequent packets are FLAC metadata blocks; the first one containing a * Vorbis comment becomes the XiphComment tag. */ export declare class OggFlacFile extends OggFile { /** The XiphComment tag parsed from the Vorbis comment metadata block, or a fresh empty tag. */ private _tag; /** Parsed FLAC audio properties from the STREAMINFO block, or `null` if not yet read. */ private _properties; /** * Number of header packets in an OGG FLAC stream (identification + Vorbis comment). * @returns `2` */ protected get numHeaderPackets(): number; /** * Private constructor — use {@link OggFlacFile.open} to create instances. * @param stream - The underlying I/O stream for the FLAC-in-OGG file. */ private constructor(); /** * Open and parse a FLAC-in-OGG file from the given stream. * @param stream - The I/O stream to read from. * @param readProperties - Whether to parse audio properties. Defaults to `true`. * @param readStyle - Level of detail for audio property parsing. Defaults to `ReadStyle.Average`. * @returns A fully initialised `OggFlacFile` instance. */ static open(stream: IOStream, readProperties?: boolean, readStyle?: ReadStyle): Promise; /** * Returns the XiphComment tag for this file. * @returns The {@link XiphComment} providing access to all Vorbis comment fields. */ tag(): XiphComment; /** * Returns the audio properties parsed from the FLAC STREAMINFO block. * @returns The {@link FlacProperties}, or `null` if `readProperties` was `false` on open. */ audioProperties(): FlacProperties | null; /** * Writes the current XiphComment tag back to the stream as the Vorbis comment metadata block. * @returns `true` on success, `false` if the file is read-only. */ save(): Promise; /** * Reads tags and (optionally) audio properties from the stream. * @param readProperties - Whether to parse audio properties. * @param readStyle - Level of detail for audio property parsing. */ private read; } //# sourceMappingURL=oggFlacFile.d.ts.map