/** @packageDocumentation Audio properties for the Ogg Opus format, parsed from the OpusHead identification header (packet 0). */ import { AudioProperties } from "../../audioProperties.js"; import { ReadStyle } from "../../toolkit/types.js"; import type { OggFile } from "../oggFile.js"; /** * Audio properties for Ogg Opus files, parsed from the OpusHead identification * header (packet 0). * * OpusHead layout: * "OpusHead"(8) + version(1) + channels(1) + preSkip(2 LE) + * inputSampleRate(4 LE) + outputGain(2 LE signed) + * channelMappingFamily(1) */ export declare class OpusProperties extends AudioProperties { /** Stream duration in milliseconds, computed from first and last granule positions. */ private _lengthInMs; /** Average bitrate in kilobits per second, computed from stream length and duration. */ private _bitrate; /** Number of audio channels as declared in the OpusHead header. */ private _channels; /** Opus encoder version byte from the OpusHead header. */ private _opusVersion; /** Original input sample rate before Opus encoding, in Hz. */ private _inputSampleRate; /** Output gain in signed Q7.8 fixed-point format (divide by 256.0 to get dB). */ private _outputGain; /** * Constructs an OpusProperties instance with the given read style. * @param readStyle - Level of detail for property parsing. */ constructor(readStyle?: ReadStyle); /** * Asynchronously parse and return audio properties from the given Ogg Opus file. * @param file - The {@link OggFile} to read properties from. * @param readStyle - Level of detail for property parsing. * @returns A populated {@link OpusProperties} instance. */ static create(file: OggFile, readStyle?: ReadStyle): Promise; /** Stream duration in milliseconds, computed from first and last granule positions. */ get lengthInMilliseconds(): number; /** Average bitrate in kilobits per second, computed from stream length and duration. */ get bitrate(): number; /** Opus always decodes at 48000 Hz regardless of the original input sample rate. */ get sampleRate(): number; /** Number of audio channels as declared in the OpusHead header. */ get channels(): number; /** Opus encoder version byte from the OpusHead header (major version in bits 4–7). */ get opusVersion(): number; /** Original sample rate of the input audio before Opus encoding, in Hz. */ get inputSampleRate(): number; /** * Output gain in signed Q7.8 fixed-point format. * Divide by 256.0 to convert to dB. */ get outputGain(): number; /** * Reads and populates audio properties from the OpusHead identification header (packet 0). * @param file - The {@link OggFile} to read from. */ private read; } //# sourceMappingURL=opusProperties.d.ts.map