#include <Window.h>

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 | |
| 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.
| void Window::setSize | ( | unsigned | windowSize | ) |
Set the number of samples the window spans.
References csl::Buffer::allocateBuffers(), fillWindow(), csl::Buffer::freeBuffers(), mWindowBuffer, mWindowBufferPos, mWindowSize, and csl::Buffer::setSize().
Referenced by Window().
| void Window::setGain | ( | float | gain | ) |
| 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.
Buffer csl::Window::mWindowBuffer [protected] |
used to store the window
Referenced by csl::WelchWindow::fillWindow(), csl::BlackmanHarrisWindow::fillWindow(), csl::BlackmanWindow::fillWindow(), csl::HannWindow::fillWindow(), csl::HammingWindow::fillWindow(), csl::RectangularWindow::fillWindow(), fillWindow(), setSize(), window(), and ~Window().
unsigned csl::Window::mWindowBufferPos [protected] |
unsigned csl::Window::mWindowSize [protected] |
length in samples of the window
Referenced by dump(), csl::WelchWindow::fillWindow(), csl::BlackmanHarrisWindow::fillWindow(), csl::BlackmanWindow::fillWindow(), csl::HannWindow::fillWindow(), csl::HammingWindow::fillWindow(), csl::RectangularWindow::fillWindow(), fillWindow(), and setSize().
float csl::Window::mGain [protected] |
gain for the window
Referenced by csl::WelchWindow::fillWindow(), csl::BlackmanHarrisWindow::fillWindow(), csl::BlackmanWindow::fillWindow(), csl::HannWindow::fillWindow(), csl::RectangularWindow::fillWindow(), and setGain().
1.5.8