"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.wrapAudioContext = wrapAudioContext;
const _1 = require("../Class/$");
const MethodNotImplementedError_1 = require("../exception/MethodNotImplementedError");
function wrapAudioContext(audioContext, system) {
    const ctx = new (class Node extends _1.$ {
        constructor() {
            super(...arguments);
            this.__ = ['AC'];
        }
        audioContext() {
            return audioContext;
        }
        getDestination() {
            return audioContext.destination;
        }
        createOscillator(opt) {
            const { api: { window: { OscillatorNode }, }, } = system;
            // @ts-ignore
            return new OscillatorNode(audioContext, opt);
        }
        createAnalyser(opt) {
            throw new MethodNotImplementedError_1.MethodNotImplementedError();
        }
        disconnect(audioNode) {
            //
        }
    })(system);
    return ctx;
}
//# sourceMappingURL=AudioContext.js.map