00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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