aflibAudioBWFilter Class Reference

Audio Butterworth filter class. More...

#include <aflibAudioBWFilter.h>

Inheritance diagram for aflibAudioBWFilter:

aflibAudio aflibChain aflibMemCache List of all members.

Public Types

enum  AFLIB_BWFILTER_MODE { LOW_PASS, HIGH_PASS, BAND_PASS, BAND_REJECT }

Public Member Functions

 aflibAudioBWFilter (aflibAudio &audio, aflibAudioBWFilter::AFLIB_BWFILTER_MODE mode, double freq, double bw)
 Constuctor with an audio parent.
 ~aflibAudioBWFilter ()
 Destructor.
void setParameters (aflibAudioBWFilter::AFLIB_BWFILTER_MODE mode, double freq, double bw)
 Sets parameters for the butterworth filter class.
void setInputConfig (const aflibConfig &cfg)
 Sets the input audio data configuration of an object.
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.

Detailed Description

Audio Butterworth filter class.

This class provides support for band pass, band reject, low pass, and high pass filters using Butterworth filters.


Member Enumeration Documentation

enum aflibAudioBWFilter::AFLIB_BWFILTER_MODE

Enumerator:
LOW_PASS 
HIGH_PASS 
BAND_PASS 
BAND_REJECT 


Constructor & Destructor Documentation

aflibAudioBWFilter::aflibAudioBWFilter ( aflibAudio audio,
aflibAudioBWFilter::AFLIB_BWFILTER_MODE  mode,
double  freq,
double  bw 
)

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.

aflibAudioBWFilter::~aflibAudioBWFilter (  ) 

Destructor.


Member Function Documentation

void aflibAudioBWFilter::setParameters ( aflibAudioBWFilter::AFLIB_BWFILTER_MODE  mode,
double  freq,
double  bw 
)

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.

void aflibAudioBWFilter::setInputConfig ( const aflibConfig cfg  )  [virtual]

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.

aflibStatus aflibAudioBWFilter::compute_segment ( list< aflibData * > &  data,
long long  position = -1 
) [virtual]

Work function, must be implemented by derived class.

Reimplemented from aflibAudio.

const char* aflibAudioBWFilter::getName (  )  const [inline, virtual]

Returns the name of the derived class.

Reimplemented from aflibAudio.

bool aflibAudioBWFilter::isDataSizeSupported ( aflib_data_size  size  )  [virtual]

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.


The documentation for this class was generated from the following files:
Generated on Sat Feb 23 13:56:37 2008 for Open Source Audio Library Project by  doxygen 1.5.1