/** @packageDocumentation Ogg Opus file format handler. Reads and writes XiphComment tags and Opus 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 { OpusProperties } from "./opusProperties.js"; /** * Implementation of an Ogg Opus file. * * Packet 0 — OpusHead identification header (for audio properties). * Packet 1 — OpusTags: "OpusTags" (8 bytes) + XiphComment data (no framing bit). */ export declare class OggOpusFile extends OggFile { /** The XiphComment tag parsed from packet 1, or a fresh empty tag if absent. */ private _tag; /** Parsed Opus audio properties, or `null` if not yet read. */ private _properties; /** * Number of header packets in an Opus stream (OpusHead + OpusTags). * @returns `2` */ protected get numHeaderPackets(): number; /** * Private constructor — use {@link OggOpusFile.open} to create instances. * @param stream - The underlying I/O stream for the Opus file. */ private constructor(); /** * Open and parse an Ogg Opus 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 `OggOpusFile` 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 Opus comment fields. */ tag(): XiphComment; /** * Returns the audio properties parsed from the OpusHead identification header. * @returns The {@link OpusProperties}, or `null` if `readProperties` was `false` on open. */ audioProperties(): OpusProperties | null; /** * Writes the current XiphComment tag back to the stream as the OpusTags packet (packet 1). * @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=opusFile.d.ts.map