Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

RecInterpolator.hh

Go to the documentation of this file.
00001 /*
00002 
00003     Recursive interpolation class, header
00004     Copyright (C) 2000-2002 Jussi Laako
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 
00020 */
00021 
00022 
00023 #include "dsp/DSPConfig.hh"
00024 #include "dsp/DSPOp.hh"
00025 #include "dsp/FFTInterpolator.hh"
00026 #include "dsp/FIRInterpolator.hh"
00027 #include "dsp/IIRInterpolator.hh"
00028 
00029 
00030 #ifndef RECINTERPOLATOR_HH
00031     #define RECINTERPOLATOR_HH
00032 
00033     #define RECINT_MAX_SUB_ROUNDS       32  
00034 
00035 
00042     class clRecInterpolator
00043     {
00044             bool bInitialized;
00045             int iType;  
00046             long lFactor;  
00047             long lFilterSize;  
00048             long lSubRounds;  
00049             long lIntSize;  
00050             bool bpHalves[RECINT_MAX_SUB_ROUNDS];
00051             clDSPAlloc IntBuf;
00052             clFFTInterpolator FFTIntBank[RECINT_MAX_SUB_ROUNDS];
00053             clFIRInterpolator FIRIntBank[RECINT_MAX_SUB_ROUNDS];
00054             clIIRInterpolator IIRIntBank[RECINT_MAX_SUB_ROUNDS];
00055             void InitHalves (double);
00056         public:
00057             enum eFilterType
00058             {
00059                 FILTER_TYPE_FFT = 0,
00060                 FILTER_TYPE_FIR = 1,
00061                 FILTER_TYPE_IIR = 2
00062             };
00063             clRecInterpolator ();
00064             ~clRecInterpolator ();
00079             bool Initialize (long, long, const float *, float = 0.0f, 
00080                 int = 0);
00082             bool Initialize (long, long, const double *, double = 0.0, 
00083                 int = 0);
00085             bool Initialize (long, long, const float *, float = 0.0f, 
00086                 bool = false);
00088             bool Initialize (long, long, const double *, double = 0.0, 
00089                 bool = false);
00093             void Uninitialize ();
00100             void Put (const float *, long);
00102             void Put (const double *, long);
00113             bool Get (float *, long);
00115             bool Get (double *, long);
00116     };
00117 
00118 #endif

Generated on Tue Mar 2 19:46:45 2004 for libDSP by doxygen 1.3.6