Ardour  9.0-pre0-582-g084a23a80d
DecimatorB Class Reference

#include <DecimatorB.h>

Public Member Functions

void process (const double *src, double *dst)
 
void process (const float *src, float *dst)
 
 DecimatorB (int inLength, int decFactor)
 
virtual ~DecimatorB ()
 
int getFactor () const
 

Private Member Functions

void deInitialise ()
 
void initialise (int inLength, int decFactor)
 
void doAntiAlias (const double *src, double *dst, int length, int filteridx)
 
void doProcess ()
 

Private Attributes

int m_inputLength
 
int m_outputLength
 
int m_decFactor
 
std::vector< std::vector< double > > m_o
 
double m_a [7]
 
double m_b [7]
 
double * m_aaBuffer
 
double * m_tmpBuffer
 

Detailed Description

DecimatorB carries out a fast downsample by a power-of-two factor. It only knows how to decimate by a factor of 2, and will use repeated decimation for higher factors. A Butterworth filter of order 6 is used for the lowpass filter.

Definition at line 25 of file DecimatorB.h.

Constructor & Destructor Documentation

◆ DecimatorB()

DecimatorB::DecimatorB ( int  inLength,
int  decFactor 
)

Construct a DecimatorB to operate on input blocks of length inLength, with decimation factor decFactor. inLength should be a multiple of decFactor. Output blocks will be of length inLength / decFactor.

decFactor must be a power of two.

◆ ~DecimatorB()

virtual DecimatorB::~DecimatorB ( )
virtual

Member Function Documentation

◆ deInitialise()

void DecimatorB::deInitialise ( )
private

◆ doAntiAlias()

void DecimatorB::doAntiAlias ( const double *  src,
double *  dst,
int  length,
int  filteridx 
)
private

◆ doProcess()

void DecimatorB::doProcess ( )
private

◆ getFactor()

int DecimatorB::getFactor ( ) const
inline

Definition at line 42 of file DecimatorB.h.

◆ initialise()

void DecimatorB::initialise ( int  inLength,
int  decFactor 
)
private

◆ process() [1/2]

void DecimatorB::process ( const double *  src,
double *  dst 
)

◆ process() [2/2]

void DecimatorB::process ( const float *  src,
float *  dst 
)

Member Data Documentation

◆ m_a

double DecimatorB::m_a[7]
private

Definition at line 56 of file DecimatorB.h.

◆ m_aaBuffer

double* DecimatorB::m_aaBuffer
private

Definition at line 59 of file DecimatorB.h.

◆ m_b

double DecimatorB::m_b[7]
private

Definition at line 57 of file DecimatorB.h.

◆ m_decFactor

int DecimatorB::m_decFactor
private

Definition at line 52 of file DecimatorB.h.

◆ m_inputLength

int DecimatorB::m_inputLength
private

Definition at line 50 of file DecimatorB.h.

◆ m_o

std::vector<std::vector<double> > DecimatorB::m_o
private

Definition at line 54 of file DecimatorB.h.

◆ m_outputLength

int DecimatorB::m_outputLength
private

Definition at line 51 of file DecimatorB.h.

◆ m_tmpBuffer

double* DecimatorB::m_tmpBuffer
private

Definition at line 60 of file DecimatorB.h.


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