CSL 5.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Clipper.h
Go to the documentation of this file.
1 //
2 // Clipper.h -- hard clipping processor
3 // See the copyright notice and acknowledgment of authors in the file COPYRIGHT
4 //
5
6 #ifndef CSL_Clipper_H
7 #define CSL_Clipper_H
8
9 #include "CSL_Core.h"
10
11 namespace csl {
12
13 /// Whether to clip using the minimum, maximum or both values.
14
15 typedef enum {
16 kMin,
17 kMax,
18 kBoth
19 } ClipperFlags;
20
21 ///
22 /// Clipper class
23 ///
24
25 class Clipper : public Effect {
26
27 public:
28 /// Constructor takes the input UGen and optionally the flags, min and max.
29 Clipper(UnitGenerator & input, float min = -1, float max = 1, ClipperFlags flags = kBoth);
30 ~Clipper();
31
32 void dump(); ///< print the receiver for debugging
33
34 void nextBuffer(Buffer &outputBuffer, unsigned outBufNum) throw (CException);
35
36 private:
37 ClipperFlags mFlags;
38 float mMin, mMax;
39 };
40
41 }
42
43 #endif