00001 00028 #ifndef ASYNC_AUDIO_FILTER_INCLUDED 00029 #define ASYNC_AUDIO_FILTER_INCLUDED 00030 00031 00032 /**************************************************************************** 00033 * 00034 * System Includes 00035 * 00036 ****************************************************************************/ 00037 00038 #include <string> 00039 00040 00041 /**************************************************************************** 00042 * 00043 * Project Includes 00044 * 00045 ****************************************************************************/ 00046 00047 00048 00049 /**************************************************************************** 00050 * 00051 * Local Includes 00052 * 00053 ****************************************************************************/ 00054 00055 #include <AsyncAudioProcessor.h> 00056 00057 00058 00059 /**************************************************************************** 00060 * 00061 * Forward declarations 00062 * 00063 ****************************************************************************/ 00064 00065 00066 00067 /**************************************************************************** 00068 * 00069 * Namespace 00070 * 00071 ****************************************************************************/ 00072 00073 namespace Async 00074 { 00075 00076 00077 /**************************************************************************** 00078 * 00079 * Forward declarations of classes inside of the declared namespace 00080 * 00081 ****************************************************************************/ 00082 00083 class FidVars; 00084 00085 00086 /**************************************************************************** 00087 * 00088 * Defines & typedefs 00089 * 00090 ****************************************************************************/ 00091 00092 00093 00094 /**************************************************************************** 00095 * 00096 * Exported Global Variables 00097 * 00098 ****************************************************************************/ 00099 00100 00101 00102 /**************************************************************************** 00103 * 00104 * Class definitions 00105 * 00106 ****************************************************************************/ 00107 00113 class AudioFilter : public AudioProcessor 00114 { 00115 public: 00121 explicit AudioFilter(const std::string &filter_spec, int sample_rate=8000); 00122 00126 ~AudioFilter(void); 00127 00132 void setOutputGain(float gain) { output_gain = gain; } 00133 00137 void reset(void); 00138 00139 00140 protected: 00152 void processSamples(float *dest, const float *src, int count); 00153 00154 00155 private: 00156 FidVars *fv; 00157 float output_gain; 00158 00159 AudioFilter(const AudioFilter&); 00160 AudioFilter& operator=(const AudioFilter&); 00161 00162 }; /* class AudioFilter */ 00163 00164 00165 } /* namespace */ 00166 00167 #endif /* ASYNC_AUDIO_FILTER_INCLUDED */ 00168 00169 00170 00171 /* 00172 * This file has not been truncated 00173 */ 00174