qm-dsp  1.8
SincWindow Class Reference

A window containing values of the sinc function, i.e. More...

#include <SincWindow.h>

List of all members.

Public Member Functions

 SincWindow (int length, double p)
 Construct a windower of the given length, containing the values of sinc(x) with x=0 in the middle, i.e.
int getLength () const
const double * getWindow () const
void cut (double *src) const
void cut (const double *src, double *dst) const

Private Member Functions

void init ()

Private Attributes

int m_length
double m_p
std::vector< double > m_window

Detailed Description

A window containing values of the sinc function, i.e.

sin(x)/x with sinc(0) == 1, with x == 0 at the centre.

Definition at line 23 of file SincWindow.h.


Constructor & Destructor Documentation

SincWindow::SincWindow ( int  length,
double  p 
) [inline]

Construct a windower of the given length, containing the values of sinc(x) with x=0 in the middle, i.e.

at sample (length-1)/2 for odd or (length/2)+1 for even length, such that the distance from -pi to pi (the nearest zero crossings either side of the peak) is p samples.

Definition at line 33 of file SincWindow.h.

References init().


Member Function Documentation

int SincWindow::getLength ( ) const [inline]

Definition at line 35 of file SincWindow.h.

References m_length.

const double* SincWindow::getWindow ( ) const [inline]

Definition at line 39 of file SincWindow.h.

References m_window.

void SincWindow::cut ( double *  src) const [inline]

Definition at line 43 of file SincWindow.h.

Referenced by Resampler::initialise().

void SincWindow::cut ( const double *  src,
double *  dst 
) const [inline]

Definition at line 47 of file SincWindow.h.

References m_length, and m_window.

void SincWindow::init ( ) [private]

Definition at line 19 of file SincWindow.cpp.

References m_length, m_p, and m_window.

Referenced by SincWindow().


Member Data Documentation

int SincWindow::m_length [private]

Definition at line 54 of file SincWindow.h.

Referenced by cut(), getLength(), and init().

double SincWindow::m_p [private]

Definition at line 55 of file SincWindow.h.

Referenced by init().

std::vector<double> SincWindow::m_window [private]

Definition at line 56 of file SincWindow.h.

Referenced by cut(), getWindow(), and init().


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