#include <AAFilter.h>
Definition at line 50 of file AAFilter.h.
Public Member Functions | |
| AAFilter (uint length) | |
| ~AAFilter () | |
| void | setCutoffFreq (double newCutoffFreq) |
| Sets new anti-alias filter cut-off edge frequency, scaled to sampling frequency (nyquist frequency = 0.5). | |
| void | setLength (uint newLength) |
| Sets number of FIR filter taps, i.e. ~filter complexity. | |
| uint | getLength () const |
| uint | evaluate (soundtouch::SAMPLETYPE *dest, const soundtouch::SAMPLETYPE *src, uint numSamples, uint numChannels) const |
| Applies the filter to the given sequence of samples. | |
Protected Member Functions | |
| void | calculateCoeffs () |
| Calculate the FIR coefficients realizing the given cutoff-frequency. | |
Protected Attributes | |
| class FIRFilter * | pFIR |
| double | cutoffFreq |
| Low-pass filter cut-off frequency, negative = invalid. | |
| uint | length |
| num of filter taps | |
| AAFilter::AAFilter | ( | uint | length | ) |
Definition at line 61 of file AAFilter.cpp.
| AAFilter::~AAFilter | ( | ) |
Definition at line 70 of file AAFilter.cpp.
| void AAFilter::calculateCoeffs | ( | ) | [protected] |
Calculate the FIR coefficients realizing the given cutoff-frequency.
Definition at line 98 of file AAFilter.cpp.
Referenced by setCutoffFreq(), and setLength().
| void AAFilter::setCutoffFreq | ( | double | newCutoffFreq | ) |
Sets new anti-alias filter cut-off edge frequency, scaled to sampling frequency (nyquist frequency = 0.5).
The filter will cut off the frequencies than that.
Definition at line 80 of file AAFilter.cpp.
Referenced by soundtouch::RateTransposer::setRate().
| void AAFilter::setLength | ( | uint | newLength | ) |
Sets number of FIR filter taps, i.e. ~filter complexity.
Definition at line 89 of file AAFilter.cpp.
Referenced by AAFilter(), and soundtouch::SoundTouch::setSetting().
| uint AAFilter::getLength | ( | ) | const |
| uint AAFilter::evaluate | ( | soundtouch::SAMPLETYPE * | dest, | |
| const soundtouch::SAMPLETYPE * | src, | |||
| uint | numSamples, | |||
| uint | numChannels | |||
| ) | const |
Applies the filter to the given sequence of samples.
Note : The amount of outputted samples is by value of 'filter length' smaller than the amount of input samples.
Definition at line 175 of file AAFilter.cpp.
Referenced by soundtouch::RateTransposer::downsample(), and soundtouch::RateTransposer::upsample().
class FIRFilter* AAFilter::pFIR [protected] |
Definition at line 53 of file AAFilter.h.
Referenced by AAFilter(), calculateCoeffs(), evaluate(), getLength(), and ~AAFilter().
double AAFilter::cutoffFreq [protected] |
Low-pass filter cut-off frequency, negative = invalid.
Definition at line 56 of file AAFilter.h.
Referenced by AAFilter(), calculateCoeffs(), and setCutoffFreq().
uint AAFilter::length [protected] |
num of filter taps
Definition at line 59 of file AAFilter.h.
Referenced by calculateCoeffs(), and setLength().
1.5.5