#ifndef DEF_DSP #define DEF_DSP #include "stdint.h" #include #include #include class dsp { protected: double prev_phase = 0; double constrainAngle(double x); double angleConv(double angle); double angleDiff(double a,double b); double unwrap(double previousAngle,double newAngle); int arctan2(int y, int x); public: uint32_t samplerate; //double phase; double amplitude; double frequency; dsp(); dsp(uint32_t samplerate); void pushsample(std::complex sample); }; #endif