
/////////////////////////////////////////////////////////////////
//                                                             //
//        Difine the signal processing hieraracy (signal.h)    //
//                                                             //
/////////////////////////////////////////////////////////////////

#ifndef SIGNALH
#define SIGNALH

class spu { // abstract signal processing unit
 protected:
    float resolution;
    float scale;
    float offset; 
 public:
    spu(float r, float s, float o);
    virtual float process(float signal) = 0;
    float num_steps(void) {
      return resolution;
    }
    float factor(void) {
      return scale;
    }
    float start(void) {
      return offset;
    }
};


// Inherited class linearSpu from spu

class linearSpu : public spu {
 public:
  linearSpu(float r, float s, float o) : spu(r, s, o) { ; }
  virtual float process(float signal);
};


// Inherited class logSpu from spu

class logSpu : public spu {
 public:
  logSpu(float r, float s, float o) : spu(r, s, o) { ; }
  virtual float process(float signal);
};



#endif
