/** @packageDocumentation ScreamTracker III (S3M) file format handler. Reads the module title and instrument names; supports writing both back. */ import { File } from "../file.js"; import { Tag } from "../tag.js"; import { ReadStyle } from "../toolkit/types.js"; import type { IOStream } from "../toolkit/ioStream.js"; import { S3mProperties } from "./s3mProperties.js"; /** * ScreamTracker III (S3M) file format handler. * * The module title occupies the first 28 bytes at offset 0. The four-byte * magic "SCRM" appears at offset 44. Sample/instrument names are read and * stored as a newline-delimited tag comment. */ export declare class S3mFile extends File { /** The tag holding the module title, comment (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 S3mFile.open} to create instances. * @param stream - The underlying I/O stream for this S3M file. */ private constructor(); /** * Opens and parses an S3M 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 `S3mFile` instance. */ static open(stream: IOStream, readProperties?: boolean, readStyle?: ReadStyle): Promise; /** * Quick-check whether `stream` looks like a valid S3M file. * Seeks to offset 44 and verifies the four-byte "SCRM" magic signature. * @param stream - The I/O stream to test. * @returns `true` if the stream appears to be a valid S3M file. */ static isSupported(stream: IOStream): Promise; /** * Returns the tag for this S3M file. * @returns The {@link ModTag} containing title and comment fields. */ tag(): Tag; /** * Returns the audio properties parsed from the S3M header. * @returns The {@link S3mProperties}, or `null` if `readProperties` was `false` on open. */ audioProperties(): S3mProperties | null; /** * Writes pending tag changes (title and sample/instrument 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 S3M stream. * @param readProperties - Whether to parse audio properties. * @param readStyle - Level of detail for audio property parsing. */ private read; } //# sourceMappingURL=s3mFile.d.ts.map