#include <Decimator.h>
|
void | deInitialise () |
|
void | initialise (unsigned int inLength, unsigned int decFactor) |
|
void | doAntiAlias (const double *src, double *dst, unsigned int length) |
|
void | doAntiAlias (const float *src, double *dst, unsigned int length) |
|
Decimator carries out a fast downsample by a power-of-two factor. Only a limited number of factors are supported, from two to whatever getHighestSupportedFactor() returns. This is much faster than Resampler but has a worse signal-noise ratio.
Definition at line 24 of file Decimator.h.
◆ Decimator()
Decimator::Decimator |
( |
unsigned int |
inLength, |
|
|
unsigned int |
decFactor |
|
) |
| |
Construct a Decimator 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. The highest supported factor is obtained through getHighestSupportedFactor(); for higher factors, you will need to chain more than one decimator.
◆ ~Decimator()
virtual Decimator::~Decimator |
( |
| ) |
|
|
virtual |
◆ deInitialise()
void Decimator::deInitialise |
( |
| ) |
|
|
private |
◆ doAntiAlias() [1/2]
void Decimator::doAntiAlias |
( |
const double * |
src, |
|
|
double * |
dst, |
|
|
unsigned int |
length |
|
) |
| |
|
private |
◆ doAntiAlias() [2/2]
void Decimator::doAntiAlias |
( |
const float * |
src, |
|
|
double * |
dst, |
|
|
unsigned int |
length |
|
) |
| |
|
private |
◆ getFactor()
int Decimator::getFactor |
( |
| ) |
const |
|
inline |
◆ getHighestSupportedFactor()
static int Decimator::getHighestSupportedFactor |
( |
| ) |
|
|
inlinestatic |
◆ initialise()
void Decimator::initialise |
( |
unsigned int |
inLength, |
|
|
unsigned int |
decFactor |
|
) |
| |
|
private |
◆ process() [1/2]
void Decimator::process |
( |
const double * |
src, |
|
|
double * |
dst |
|
) |
| |
Process inLength samples (as supplied to constructor) from src and write inLength / decFactor samples to dst. Note that src and dst may be the same or overlap (an intermediate buffer is used).
◆ process() [2/2]
void Decimator::process |
( |
const float * |
src, |
|
|
float * |
dst |
|
) |
| |
Process inLength samples (as supplied to constructor) from src and write inLength / decFactor samples to dst. Note that src and dst may be the same or overlap (an intermediate buffer is used).
◆ resetFilter()
void Decimator::resetFilter |
( |
| ) |
|
◆ decBuffer
double* Decimator::decBuffer |
|
private |
◆ Input
◆ m_decFactor
unsigned int Decimator::m_decFactor |
|
private |
◆ m_inputLength
unsigned int Decimator::m_inputLength |
|
private |
◆ m_outputLength
unsigned int Decimator::m_outputLength |
|
private |
◆ o1
◆ o2
◆ o3
◆ o4
◆ o5
◆ o6
◆ o7
◆ Output
The documentation for this class was generated from the following file: