/******************************************************************************/ /* iir.h /******************************************************************************/ #ifndef RESAMPLE_H #define RESAMPLE_H #include "fir.h" #include "firinterp.h" #include "firdecim.h" #if defined(__cplusplus) extern "C" { #endif /******************************************************************************/ typedef struct _sRESAMPLER { FIRIP *pFirL; FIRDECIM *pFirM; float fs1, fs2; int L, M, *pStagesL, *pStagesM; int nStagesL, nStagesM; float **pTemp; // Fast Resample int currPhase; float *pH, *pZ; int nTapsPerPhase; int sizeH; }RESAMPLER; /******************************************************************************/ int GGT2(int a, int b); int GetNumStages(int n); int PrimeFactor(int n, int *pBuf); void jsort(int *pBuf, int len); void RSinit(struct _sRESAMPLER *pObj, int nCoef, float fs1, float fs2, int nMaxStagesL, int nMaxStagesM, int blockSize); void RSfree(struct _sRESAMPLER *pObj); int RSresample(struct _sRESAMPLER *pObj, float *pIn, float *pOut, int len); int RSresample2(struct _sRESAMPLER *pObj, float *pIn, float *pOut, int len); int RSresample3(struct _sRESAMPLER *pObj, float *pIn, float *pOut, int len); /******************************************************************************/ #if defined(__cplusplus) } #endif #endif /* RESAMPLE_H */