/** @packageDocumentation Extended Module (XM) tracker file format handler. Reads and writes title, tracker name, instrument names, and sample names. */ import { File } from "../file.js"; import { Tag } from "../tag.js"; import { ReadStyle } from "../toolkit/types.js"; import type { IOStream } from "../toolkit/ioStream.js"; import { XmProperties } from "./xmProperties.js"; /** * Extended Module (XM) file format handler. * * The 17-byte magic "Extended Module: " appears at offset 0. The module title * occupies bytes 17–36, and the tracker name bytes 38–57. Instrument and * sample names are collected and stored as a newline-delimited tag comment. */ export declare class XmFile extends File { /** The tag holding the module title, comment (instrument/sample names), and tracker name. */ private _tag; /** Parsed audio properties, or `null` if not yet read or not requested. */ private _properties; /** * Private constructor — use {@link XmFile.open} to create instances. * @param stream - The underlying I/O stream for this XM file. */ private constructor(); /** * Opens and parses an XM file from the given stream. * @param stream - Readable (and optionally writable) I/O stream. * @param readProperties - When `true` (default), parse audio properties. * @param readStyle - Controls parsing accuracy vs. speed trade-off. * @returns A fully initialised `XmFile` instance. */ static open(stream: IOStream, readProperties?: boolean, readStyle?: ReadStyle): Promise; /** * Quick-check whether `stream` looks like a valid XM file. * Reads the 17-byte magic "Extended Module: " at offset 0. * @param stream - The I/O stream to test. * @returns `true` if the stream appears to be a valid XM file. */ static isSupported(stream: IOStream): Promise; /** * Returns the tag for this XM file. * @returns The {@link ModTag} containing title, comment, and tracker name. */ tag(): Tag; /** * Returns the audio properties parsed from the XM header. * @returns The {@link XmProperties}, or `null` if `readProperties` was `false` on open. */ audioProperties(): XmProperties | null; /** * Writes pending tag changes (title, tracker name, instrument names, and * sample names) back to the file. * @returns `true` on success, `false` if the file is read-only. */ save(): Promise; /** * Reads metadata and (optionally) audio properties from the XM stream. * @param readProperties - Whether to parse audio properties. * @param readStyle - Level of detail for audio property parsing. */ private read; } //# sourceMappingURL=xmFile.d.ts.map