00001 // 00002 // Clipper.h -- hard clipping processor 00003 // See the copyright notice and acknowledgment of authors in the file COPYRIGHT 00004 // 00005 00006 #ifndef CSL_Clipper_H 00007 #define CSL_Clipper_H 00008 00009 #include "CSL_Core.h" 00010 00011 namespace csl { 00012 00014 00015 typedef enum { 00016 kMin, 00017 kMax, 00018 kBoth 00019 } ClipperFlags; 00020 00024 00025 class Clipper : public Effect { 00026 00027 public: 00029 Clipper(UnitGenerator & input, float min = -1, float max = 1, ClipperFlags flags = kBoth); 00030 ~Clipper(); 00031 00032 void dump(); 00033 00034 void nextBuffer(Buffer &outputBuffer, unsigned outBufNum) throw (CException); 00035 00036 private: 00037 ClipperFlags mFlags; 00038 float mMin, mMax; 00039 }; 00040 00041 } 00042 00043 #endif