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 #include "aflibAudio.h"
00036 
00037 
00045 class aflibAudioBWFilter: public aflibAudio {
00046 
00047 public:
00048 
00049    enum AFLIB_BWFILTER_MODE
00050    {
00051       LOW_PASS,
00052       HIGH_PASS,
00053       BAND_PASS,
00054       BAND_REJECT
00055    };
00056 
00057    // Available contructors and destructors
00058    aflibAudioBWFilter(
00059       aflibAudio& audio,
00060       aflibAudioBWFilter::AFLIB_BWFILTER_MODE mode,
00061       double              freq,
00062       double              bw);
00063 
00064    ~aflibAudioBWFilter();
00065 
00066    void
00067    setParameters(
00068       aflibAudioBWFilter::AFLIB_BWFILTER_MODE mode,
00069       double              freq,
00070       double              bw);
00071 
00072    void
00073    setInputConfig(const aflibConfig& cfg);
00074 
00075    aflibStatus
00076    compute_segment(
00077       list<aflibData *>& data,
00078       long long position = -1) ;
00079 
00081    const char *
00082    getName() const { return "aflibAudioBWFilter";};
00083 
00084    bool
00085    isDataSizeSupported(aflib_data_size size);
00086 
00087 private:
00088 
00089    aflibAudioBWFilter();
00090 
00091    aflibAudioBWFilter(const aflibAudioBWFilter& op);
00092 
00093    const aflibAudioBWFilter&
00094    operator=(const aflibAudioBWFilter& op);
00095 
00096    void
00097    allocateMemory();
00098 
00099 aflibAudioBWFilter::AFLIB_BWFILTER_MODE   _mode;
00100 double                                    _freq;
00101 double                                    _bw;
00102 double                                    _C, _D;
00103 double                                    _a[3], _b[2];
00104 double                                   *_buf_x0;
00105 double                                   *_buf_x1;
00106 double                                   *_buf_y0;
00107 double                                   *_buf_y1;
00108 int                                       _chan;
00109 
00110 };
00111 
00112 
00113 #endif

Generated at Tue Aug 7 22:18:05 2001 for Open Source Audio Library Project by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001