import { CachedAudio } from "./types"; /** * Implementation of CachedAudio interface using class-based approach to avoid closure risks. * Supports reference counting to track active usage. */ export declare class CachedAudioImpl implements CachedAudio { private readonly audioBuffer; private alive; private refCount; constructor(audioBuffer: AudioBuffer); /** * Increment the reference count. Called when a token starts using this audio. */ addRef(): void; /** * Decrement the reference count. Called when a token stops using this audio. */ releaseRef(): void; /** * Get the current reference count. */ getRefCount(): number; /** * Unload the cached audio. Will fail silently if tokens are still playing. */ unload(): Promise; /** * Force unload the cached audio, even if tokens are still playing. */ forceUnload(): Promise; /** * Check if the cached audio is still valid. */ isAlive(): boolean; /** * Get the raw audio buffer. */ raw(): AudioBuffer; }