import { AudioContextManager } from "./AudioContextManager.js";
import { AudioMixer } from "./AudioMixer.js";
export class AudioSystem {
    contextManager;
    mixerRef;
    constructor(options = {}) {
        this.contextManager = new AudioContextManager(options);
    }
    get mixer() {
        this.mixerRef ??= new AudioMixer(this.contextManager.context);
        return this.mixerRef;
    }
    async unlock() {
        await this.contextManager.unlock();
    }
    async suspend() {
        await this.contextManager.suspend();
    }
    async resume() {
        await this.contextManager.resume();
    }
    async dispose() {
        this.mixerRef?.dispose();
        this.mixerRef = undefined;
        await this.contextManager.dispose();
    }
}
//# sourceMappingURL=AudioSystem.js.map