#include <aflibAudioBWFilter.h>
Inheritance diagram for aflibAudioBWFilter::
Public Types | |
enum | AFLIB_BWFILTER_MODE { LOW_PASS, HIGH_PASS, BAND_PASS, BAND_REJECT } |
Public Methods | |
aflibAudioBWFilter (aflibAudio &audio, aflibAudioBWFilter::AFLIB_BWFILTER_MODE mode, double freq, double bw) | |
Constuctor with an audio parent. More... | |
~aflibAudioBWFilter () | |
Destructor. | |
void | setParameters (aflibAudioBWFilter::AFLIB_BWFILTER_MODE mode, double freq, double bw) |
Sets parameters for the butterworth filter class. More... | |
void | setInputConfig (const aflibConfig &cfg) |
Sets the input audio data configuration of an object. More... | |
aflibStatus | compute_segment (list< aflibData *> &data, long long position=-1) |
Work function, must be implemented by derived class. | |
const char* | getName () const |
Returns the name of the derived class. | |
bool | isDataSizeSupported (aflib_data_size size) |
Inform base class that this object only supports 16bit signed data. More... |
This class provides support for band pass, band reject, low pass, and high pass filters using Butterworth filters.
|
|
|
Constuctor with an audio parent. This constructor will setup the Butterworth filter. It accepts a mode which can be one of LOW_PASS, HIGH_PASS, BAND_PASS, and BAND_REJECT. The freq parameter applies to all 4 modes while bw is ignored for LOW_PASS and HIGH_PASS. The freq parameter represents the corner frequency for LOW_PASS or HIGH_PASS and the center frequency for BAND_PASS or BAND_REJECT. The bw parameter represents the bandwidth. Both freq and bw should be specified in Hertz. |
|
Destructor.
|
|
Work function, must be implemented by derived class.
Reimplemented from aflibAudio. |
|
Returns the name of the derived class.
Reimplemented from aflibAudio. |
|
Inform base class that this object only supports 16bit signed data. This overrides the virtual function in the base class. This algorithm works only on 16 bit signed data. Base class must convert the data. Reimplemented from aflibAudio. |
|
Sets the input audio data configuration of an object. This is a virtual function that derived classes can override if needed. It allows the caller to set the configuration of the audio data of an object. By default it saves the output audio configuration to be the same as the input data configuration that is passed in. This should be sufficient for most derived classes. For those classes that will have a change from the output to input config mapping then this function should be overriden and the output config processed and saved. Reimplemented from aflibAudio. |
|
Sets parameters for the butterworth filter class. This allows the user to change the filter parameters of the butterworth filter after the class has been setup. With this one could change the center frequency or bandwidth dynamically as data is streaming. |