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

#if !defined(_HARKLIB_NODE_CM_LOAD_H_INCLUDED_)
#define _HARKLIB_NODE_CM_LOAD_H_INCLUDED_ 1

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

////#if 1 // #ifdef ENABLE_HARKIO3
extern "C" {
#include <libharkio3.h>
}
////#endif // ENABLE_HARKIO3

namespace hark
{
namespace node
{
    class CMLoad: public NodeDef
    {
    public:
        CMLoad();

        void initialize(InputDataBundle &input);
        virtual void reset();
        virtual bool operator () (size_t count, InputDataBundle &input, OutputDataBundle &output);

    private:
        std::string current_filename;
        int pslength;
        int nb_channels;
        bool enable_debug;
        Matrix<std::complex<float> > Rxx;

        void loadCM(std::string &filename);
    };
}
}

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

/* end of file */
