first commit

This commit is contained in:
n1gp
2015-04-04 16:53:58 -04:00
commit 805637d104
232 changed files with 95906 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
//////////////////////////////////////////////////////////////////////
// fractresampler.h: interface for the CFractResampler class.
//
// This class implements a fractional resampler that can be used to
//convert between different sample rates
//
// History:
// 2010-09-15 Initial creation MSW
// 2011-03-27 Initial release
//////////////////////////////////////////////////////////////////////
#ifndef FRACTRESAMPLER_H
#define FRACTRESAMPLER_H
#include "datatypes.h"
class CFractResampler
{
public:
CFractResampler();
virtual ~CFractResampler();
void Init(int MaxInputSize);
//overloaded functions for processing different data types
int Resample( int InLength, TYPEREAL Rate, TYPEREAL* pInBuf, TYPEREAL* pOutBuf);
int Resample( int InLength, TYPEREAL Rate, TYPECPX* pInBuf, TYPECPX* pOutBuf);
int Resample( int InLength, TYPEREAL Rate, TYPEREAL* pInBuf, TYPEMONO16* pOutBuf, TYPEREAL gain);
int Resample( int InLength, TYPEREAL Rate, TYPECPX* pInBuf, TYPESTEREO16* pOutBuf, TYPEREAL gain);
private:
TYPEREAL m_FloatTime; //floating pt output time accumulator
TYPEREAL* m_pSinc; //ptr to sinc table
TYPECPX* m_pInputBuf; //internal working input sample buffer
};
#endif // FRACTRESAMPLER_H