import type { Sound } from "./sound.ts"; import { type HTMLAudioElementWithUnlocked } from "./types.ts"; export declare class AudioEngine { html5PoolSize: number; sounds: Sound[]; masterGain: GainNode | null; noAudio: boolean; usingWebAudio: boolean; autoSuspend: boolean; ctx: AudioContext | null; autoUnlock: boolean; state: string; constructor(); volume(vol?: number): number | this; mute(muted: boolean): this; stop(): this; unload(): this; codecs(ext: string): boolean; /** * Create the shared `AudioContext` and master gain node if they do not exist * yet, and return the context. * * Idempotent: with a context already live this returns it untouched. It used * to be a free function in `helpers/` that reached back into the singleton, * with no internal guard — so six call sites each carried their own * `if (!ctx)` check to stop a second context being built and the first * leaked. * * Browsers create a context in the `suspended` state until a user gesture * resumes it, so building one early costs nothing and plays nothing. * @returns the shared context, or `null` when Web Audio is unavailable */ ensureContext(): AudioContext | null; } //# sourceMappingURL=engine.d.ts.map