Window.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 #ifndef CSL_WINDOW_H
00021 #define CSL_WINDOW_H
00022 
00023 #include "CSL_Core.h"
00024 
00025 namespace csl {
00026 
00029 
00030 class Window : public UnitGenerator {
00031 public:             // Constructors:
00032     Window();       
00033 
00034     Window(unsigned windowSize, float gain = 1); 
00035     ~Window();      
00036 
00037     void setSize(unsigned windowSize);  
00038     void setGain(float gain);               
00039     SampleBuffer window() { return mWindowBuffer.mBuffers[0]; }; 
00040 
00041     void nextBuffer(Buffer &outputBuffer, unsigned outBufNum) throw (CException);
00042     void dump();        
00043     
00044 protected:
00045     Buffer mWindowBuffer;       
00046     unsigned mWindowBufferPos;  
00047     unsigned mWindowSize;       
00048     float mGain;                    
00049 
00050     virtual void fillWindow();      
00051 };
00052 
00054 
00055 class RectangularWindow : public Window {
00056 public:
00057     RectangularWindow() : Window() { }
00058     RectangularWindow(unsigned windowSize) : Window(windowSize) { }
00059     RectangularWindow(unsigned windowSize, float gain) : Window(windowSize, gain) { }
00060     ~RectangularWindow() { }
00061     
00062 protected:
00063     void fillWindow();
00064 };
00065 
00067 
00068 class HammingWindow : public Window {
00069 public:
00070 
00071     HammingWindow() : Window() { }
00072     HammingWindow(unsigned windowSize) : Window(windowSize) { }
00073     HammingWindow(unsigned windowSize, float gain) : Window(windowSize, gain) { }
00074     ~HammingWindow() { }
00075 
00076 protected:
00077     void fillWindow();
00078 };
00079 
00081 
00082 class HannWindow : public Window {
00083 public:
00084     HannWindow() : Window() { }
00085     HannWindow(unsigned windowSize) : Window(windowSize) { }
00086     HannWindow(unsigned windowSize, float gain) : Window(windowSize, gain) { }
00087     ~HannWindow() { }
00088     
00089 protected:
00090     void fillWindow();
00091 };
00092 
00094 
00095 class BlackmanWindow : public Window {
00096 public:
00097     BlackmanWindow() : Window() { }
00098     BlackmanWindow(unsigned windowSize) : Window(windowSize) { }
00099     BlackmanWindow(unsigned windowSize, float gain) : Window(windowSize, gain) { }
00100     ~BlackmanWindow() { }
00101     
00102 protected:
00103     void fillWindow();
00104 };
00105 
00107 
00108 class BlackmanHarrisWindow : public Window {
00109 public:
00110     BlackmanHarrisWindow() : Window() { }
00111     BlackmanHarrisWindow(unsigned windowSize) : Window(windowSize) { }
00112     BlackmanHarrisWindow(unsigned windowSize, float gain) : Window(windowSize, gain) { }
00113     ~BlackmanHarrisWindow() { }
00114     
00115 protected:
00116     void fillWindow();
00117 };
00118 
00120 
00121 class WelchWindow : public Window {
00122 public:
00123     WelchWindow() : Window() { }
00124     WelchWindow(unsigned windowSize) : Window(windowSize) { }
00125     WelchWindow(unsigned windowSize, float gain) : Window(windowSize, gain) { }
00126     ~WelchWindow() { }
00127     
00128 protected:
00129     void fillWindow();
00130 };
00131 
00132 }  // end of namespace
00133 
00134 #endif

Generated on Thu Sep 17 23:14:16 2009 for CSL by  doxygen 1.5.8