"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.wrapAudioContext = void 0;
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'];
        }
        get() {
            return audioContext;
        }
        getDestination() {
            return audioContext.destination;
        }
        createOscilator(opt) {
            const { api: { window: { OscillatorNode }, }, } = system;
            // @ts-ignore
            return new OscillatorNode(audioContext, opt);
        }
        createAnalyser(opt) {
            throw new MethodNotImplementedError_1.MethodNotImplementedError();
        }
    })(system);
    return ctx;
}
exports.wrapAudioContext = wrapAudioContext;
//# sourceMappingURL=AudioContext.js.map