/*
   HARK Library
   Copyright (C) 2021 Honda Research Institute Japan Inc.
 */

#if !defined(_HARKLIB_NODE_MULTI_FF_T_H_INCLUDED_)
#define _HARKLIB_NODE_MULTI_FF_T_H_INCLUDED_ 1

#include "hark-lib/hark-lib.h"
#include "hark-lib/node.h"

#include "hark-lib/extlib/fft.hpp"

namespace hark
{
namespace node
{
    class MultiFFT: public NodeDef
    {
    public:
        MultiFFT();
        virtual void reset();
        virtual bool operator () (size_t count, InputDataBundle &input, OutputDataBundle &output);

    private:
        void initialize_parameters(InputDataBundle &input);

    private:
        enum WINDOW_TYPE {
            UNKNOWN_WINDOW, CONJ_WINDOW, RECTANGLE_WINDOW, HAMMING_WINDOW, HANNING_WINDOW
        };

        int _length;
        WINDOW_TYPE _window_type;

        int _pslength;
        // int r;

        std::vector<float>_window;
        rfft<float>_rfft;

    };
}
}

#endif /* #if !defined(_HARKLIB_NODE_MULTI_FF_T_H_INCLUDED_) */

/* end of file */
