Flan
Public Member Functions | Static Public Member Functions | Friends | List of all members
r8b::CDSPFIRFilter Class Reference

Calculation and storage class for FIR filters. More...

#include <CDSPFIRFilter.h>

Inheritance diagram for r8b::CDSPFIRFilter:
Inheritance graph
[legend]
Collaboration diagram for r8b::CDSPFIRFilter:
Collaboration graph
[legend]

Public Member Functions

bool isZeroPhase () const
 
int getLatency () const
 
double getLatencyFrac () const
 
int getKernelLen () const
 
int getBlockLenBits () const
 
const double * getKernelBlock () const
 
void unref ()
 This function should be called when the filter obtained via the filter cache is no longer needed.
 

Static Public Member Functions

static double getLPMinTransBand ()
 
static double getLPMaxTransBand ()
 
static double getLPMinAtten ()
 
static double getLPMaxAtten ()
 

Friends

class CDSPFIRFilterCache
 

Detailed Description

Calculation and storage class for FIR filters.

Class that implements calculation and storing of a FIR filter (currently contains low-pass filter calculation routine designed for sample rate conversion). Objects of this class cannot be created directly, but can be obtained via the CDSPFilterCache::getLPFilter() static function.

Member Function Documentation

◆ getBlockLenBits()

int r8b::CDSPFIRFilter::getBlockLenBits ( ) const
inline
Returns
Filter's block length, espressed as Nth power of 2. The actual length is twice as large due to zero-padding.

◆ getKernelBlock()

const double* r8b::CDSPFIRFilter::getKernelBlock ( ) const
inline
Returns
Filter's kernel block, in complex-numbered form obtained via the CDSPRealFFT::forward() function call, zero-padded, gain-adjusted with the CDSPRealFFT::getInvMulConst() * ReqGain constant, immediately suitable for convolution. Kernel block may have "zero-phase" response, depending on the isZeroPhase() function's result.

◆ getKernelLen()

int r8b::CDSPFIRFilter::getKernelLen ( ) const
inline
Returns
Filter kernel length, in samples. Not to be confused with the block length.

◆ getLatency()

int r8b::CDSPFIRFilter::getLatency ( ) const
inline
Returns
Filter's latency, in samples (integer part).

◆ getLatencyFrac()

double r8b::CDSPFIRFilter::getLatencyFrac ( ) const
inline
Returns
Filter's latency, in samples (fractional part). Always zero for linear-phase filters.

◆ getLPMaxAtten()

static double r8b::CDSPFIRFilter::getLPMaxAtten ( )
inlinestatic
Returns
The maximal allowed low-pass filter's stop-band attenuation, in decibel.

◆ getLPMaxTransBand()

static double r8b::CDSPFIRFilter::getLPMaxTransBand ( )
inlinestatic
Returns
The maximal allowed low-pass filter's transition band, in percent.

◆ getLPMinAtten()

static double r8b::CDSPFIRFilter::getLPMinAtten ( )
inlinestatic
Returns
The minimal allowed low-pass filter's stop-band attenuation, in decibel.

◆ getLPMinTransBand()

static double r8b::CDSPFIRFilter::getLPMinTransBand ( )
inlinestatic
Returns
The minimal allowed low-pass filter's transition band, in percent.

◆ isZeroPhase()

bool r8b::CDSPFIRFilter::isZeroPhase ( ) const
inline
Returns
"True" if kernel block of *this filter has zero-phase response.

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