Async::AudioDecimator Class Reference
Decimates a higher sample rate into a lower one.
More...
#include <AsyncAudioDecimator.h>
List of all members.
Public Member Functions
Protected Member Functions
- virtual void processSamples (float *dest, const float *src, int count)
- Process incoming samples and put them into the output buffer.
Detailed Description
Decimates a higher sample rate into a lower one.
- Author:
- Tobias Blomberg / SM0SVX
- Date:
- 2008-04-06
This audio pipe class will decimate an audio stream down to a lower sampling rate. Decimation is a process where the sampling rate is reduced by an integer factor. To reduce the rate a lowpass filter must first be applied. This filter is built into this component. However, the filter coefficients (FIR) must be calculated manually.
Use this web page to calculate the coefficients: http://www.dsptutor.freeuk.com/remez/RemezFIRFilterDesign.html
This implementation is based on the multirate FAQ at dspguru.com: http://dspguru.com/info/faqs/mrfaq.htm
Definition at line 116 of file AsyncAudioDecimator.h.
Constructor & Destructor Documentation
Async::AudioDecimator::AudioDecimator |
( |
int |
decimation_factor, |
|
|
const float * |
filter_coeff, |
|
|
int |
taps | |
|
) |
| | |
Constructor.
- Parameters:
-
| decimation_factor | The decimation factor |
| filter_coeff | An array holding the filter coefficients |
| taps | The numer of taps in the filter |
Async::AudioDecimator::~AudioDecimator |
( |
void |
|
) |
|
Member Function Documentation
virtual void Async::AudioDecimator::processSamples |
( |
float * |
dest, |
|
|
const float * |
src, |
|
|
int |
count | |
|
) |
| | [protected, virtual] |
Process incoming samples and put them into the output buffer.
- Parameters:
-
| dest | Destination buffer |
| src | Source buffer |
| count | Number of samples in the source buffer |
This function should be reimplemented by the inheriting class to do the actual processing of the incoming samples. All samples must be processed, otherwise they are lost and the output buffer will contain garbage.
Implements Async::AudioProcessor.
The documentation for this class was generated from the following file: