Esempio n. 1
0
/*! Sets FFT size */
void Fft::SetMode(uint FftSize)
{
	if (m_Spec!=0)
	{
		Free(m_Buf);
		FFTFree(m_Spec);
	}
	m_sFFT = FftSize;
	// Setup IPP structures
	int Order = 1;
	while ((1<<Order)<m_sFFT) ++Order;
	ZASSERT((1<<Order)==m_sFFT);	// FFT size must be a power of 2
	FFTInit(&m_Spec, Order);
	uint sBuffer;
	FFTGetBufSize(m_Spec, &sBuffer);
	m_Buf = Malloc_Byte(sBuffer);
}
Esempio n. 2
0
  virtual void init(int samplingFreq) {
		classInit(samplingFreq);
		instanceInit(samplingFreq);
		FFTInit(); //one fft for now
	}