"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Holder_1 = require("../../../../../../Class/Holder");
const Array_1 = require("../../../../../../wrap/Array");
const _ids_1 = require("../../../../../_ids");
class GetByteFrequencyData extends Holder_1.Holder {
    constructor(system) {
        super({
            fi: ['node', 'opt'],
            fo: ['data'],
            i: [],
        }, {
            input: {
                node: {
                    ref: true,
                },
            },
            output: {
                data: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_GET_BYTE_FREQUENCY_DATA);
    }
    f({ node, opt }, done) {
        const fftSize = node.getFFTSize();
        const _data = new Uint8Array(fftSize);
        node.getByteFrequencyData(_data);
        const data = (0, Array_1.wrapUint8Array)(_data, this.__system);
        done({
            data,
        });
    }
}
exports.default = GetByteFrequencyData;
//# sourceMappingURL=index.js.map