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

#if !defined(_HARKLIB_NODE_PRE_EMPHASIS_H_INCLUDED_)
#define _HARKLIB_NODE_PRE_EMPHASIS_H_INCLUDED_ 1

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

#include <string>
#include <vector>
#include <complex>

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

    private:
        void update_parameters(InputDataBundle &input);

    private:
        int length;
        int pslength;
        int sampling_rate;
        float preemcoef;

        int separ_length;
        int cutoff;
        std::string input_type;

        std::vector<std::complex<float>>preempha;

    };
}
}

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

/* end of file */
