Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

aflibAudioBWFilter.h

Go to the documentation of this file.
00001 /*
00002 This file was derived from the following work listed below. It
00003 was modified for this class by Bruce W. Forsberg (forsberg@tns.net).
00004 
00005 Modified from spkit software. Files
00006 butterwo
00007 bwbandpa
00008 bwbandre
00009 bwhighpa
00010 bwlowpas
00011 
00012 
00013     Sound Processing Kit - A C++ Class Library for Audio Signal Processing
00014     Copyright (C) 1995-1998 Kai Lassfolk
00015  
00016     This library is free software; you can redistribute it and/or
00017     modify it under the terms of the GNU Library General Public
00018     License as published by the Free Software Foundation; either
00019     version 2 of the License, or (at your option) any later version.
00020  
00021     This library is distributed in the hope that it will be useful,
00022     but WITHOUT ANY WARRANTY; without even the implied warranty of
00023     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00024     Library General Public License for more details.
00025  
00026     You should have received a copy of the GNU Library General Public
00027     License along with this library; if not, write to the Free
00028     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00029 */
00030 
00031 
00032 #ifndef _AFLIBAUDIOBWFILTER_H_
00033 #define _AFLIBAUDIOBWFILTER_H_
00034 
00035 #ifdef HAVE_CONFIG_H
00036 #include <config.h>
00037 #endif
00038 
00039 #include "aflibAudio.h"
00040 
00041 
00049 class aflibAudioBWFilter: public aflibAudio {
00050 
00051 public:
00052 
00053    enum AFLIB_BWFILTER_MODE
00054    {
00055       LOW_PASS,
00056       HIGH_PASS,
00057       BAND_PASS,
00058       BAND_REJECT
00059    };
00060 
00061    // Available contructors and destructors
00062    aflibAudioBWFilter(
00063       aflibAudio& audio,
00064       aflibAudioBWFilter::AFLIB_BWFILTER_MODE mode,
00065       double              freq,
00066       double              bw);
00067 
00068    ~aflibAudioBWFilter();
00069 
00070    void
00071    setParameters(
00072       aflibAudioBWFilter::AFLIB_BWFILTER_MODE mode,
00073       double              freq,
00074       double              bw);
00075 
00076    void
00077    setInputConfig(const aflibConfig& cfg);
00078 
00079    aflibStatus
00080    compute_segment(
00081       list<aflibData *>& data,
00082       long long position = -1) ;
00083 
00085    const char *
00086    getName() const { return "aflibAudioBWFilter";};
00087 
00088    bool
00089    isDataSizeSupported(aflib_data_size size);
00090 
00091 private:
00092 
00093    aflibAudioBWFilter();
00094 
00095    aflibAudioBWFilter(const aflibAudioBWFilter& op);
00096 
00097    const aflibAudioBWFilter&
00098    operator=(const aflibAudioBWFilter& op);
00099 
00100    void
00101    allocateMemory();
00102 
00103 aflibAudioBWFilter::AFLIB_BWFILTER_MODE   _mode;
00104 double                                    _freq;
00105 double                                    _bw;
00106 double                                    _C, _D;
00107 double                                    _a[3], _b[2];
00108 double                                   *_buf_x0;
00109 double                                   *_buf_x1;
00110 double                                   *_buf_y0;
00111 double                                   *_buf_y1;
00112 int                                       _chan;
00113 
00114 };
00115 
00116 
00117 #endif

Generated on Wed May 8 20:51:05 2002 for Open Source Audio Library Project by doxygen1.2.15