"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../../../Class/Functional");
const AudioNode_1 = require("../../../../../../wrap/AudioNode");
const _ids_1 = require("../../../../../_ids");
class MixerNode extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['a', 'b'],
            o: ['node'],
        }, {
            input: {
                a: {
                    ref: true,
                },
                b: {
                    ref: true,
                },
            },
            output: {
                node: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_MIXER_NODE);
        this.addListener('destroy', () => {
            if (this._node) {
                //
            }
        });
    }
    f({ a: aNode, b: bNode }, done) {
        let _node;
        const context = aNode.getContext();
        _node = context.createGain();
        this._node = _node;
        aNode.connect(_node);
        bNode.connect(_node);
        const node = (0, AudioNode_1.wrapAudioNode)(_node, this.__system);
        done({
            node,
        });
    }
    d() {
        //
    }
}
exports.default = MixerNode;
//# sourceMappingURL=index.js.map