csl::Window Class Reference

#include <Window.h>

Inheritance diagram for csl::Window:

csl::UnitGenerator csl::Model csl::BlackmanHarrisWindow csl::BlackmanWindow csl::HammingWindow csl::HannWindow csl::RectangularWindow csl::WelchWindow

List of all members.

Public Member Functions

 Window ()
 Window (unsigned windowSize, float gain=1)
 ~Window ()
 clean-up . . . free the allocated buffer that held the window data.
void setSize (unsigned windowSize)
 Set the number of samples the window spans.
void setGain (float gain)
 Set the gain to which the window should be normalized.
SampleBuffer window ()
void nextBuffer (Buffer &outputBuffer, unsigned outBufNum) throw (CException)
 Returns a pointer to the window data.
void dump ()
 Print some info about the window.

Protected Member Functions

virtual void fillWindow ()
 subclasses override this to fill the buffer with corresponding function.

Protected Attributes

Buffer mWindowBuffer
 used to store the window
unsigned mWindowBufferPos
 where am I in the window buffer
unsigned mWindowSize
 length in samples of the window
float mGain
 gain for the window


Detailed Description

Window; The superclass of all other window function classes in CSL. Subclasses need only to implement the fillWindow(); and the Constructors.

Constructor & Destructor Documentation

Window::Window (  ) 

Creates a window using the default Gestalt size and a gain of 1; Creates a window (hann) with the specified size and gain (gain is optional).

References csl::CGestalt::blockSize(), and setSize().

Window::Window ( unsigned  windowSize,
float  gain = 1 
)

References setSize().

Window::~Window (  ) 

clean-up . . . free the allocated buffer that held the window data.

References csl::Buffer::freeBuffers(), and mWindowBuffer.


Member Function Documentation

void Window::setSize ( unsigned  windowSize  ) 

void Window::setGain ( float  gain  ) 

Set the gain to which the window should be normalized.

References fillWindow(), and mGain.

SampleBuffer csl::Window::window (  )  [inline]

void Window::nextBuffer ( Buffer outputBuffer,
unsigned  outBufNum 
) throw (CException) [virtual]

Returns a pointer to the window data.

get everything into registers

Reimplemented from csl::UnitGenerator.

References csl::logMsg().

void Window::dump ( void   )  [virtual]

Print some info about the window.

Reimplemented from csl::UnitGenerator.

References csl::logMsg(), and mWindowSize.

void Window::fillWindow (  )  [protected, virtual]

subclasses override this to fill the buffer with corresponding function.

Reimplemented in csl::RectangularWindow, csl::HammingWindow, csl::HannWindow, csl::BlackmanWindow, csl::BlackmanHarrisWindow, and csl::WelchWindow.

References CSL_TWOPI, csl::Buffer::mBuffers, mWindowBuffer, and mWindowSize.

Referenced by setGain(), and setSize().


Member Data Documentation

unsigned csl::Window::mWindowBufferPos [protected]

where am I in the window buffer

Referenced by setSize().

unsigned csl::Window::mWindowSize [protected]

float csl::Window::mGain [protected]


The documentation for this class was generated from the following files:

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