/** * Speex resampling test / information. */ #define _USE_MATH_DEFINES #include #include #include #include #include "Timer.h" #define ITER 1000 #include int main(int argc, char **argv) { ippStaticInit(); ippSetNumThreads(1); #ifdef Q_OS_WIN if (!SetPriorityClass(GetCurrentProcess(),HIGH_PRIORITY_CLASS)) qWarning("Application: Failed to set priority!"); #endif QCoreApplication a(argc, argv); SpeexResamplerState *srs; int iMicFreq = 44100; int iSampleRate = 48000; int iFrameSize = iSampleRate / 100; int err = 0; srs = speex_resampler_init(1, iMicFreq, iSampleRate, 3, &err); int iMicLength = (iFrameSize * iMicFreq) / iSampleRate; qWarning() << iMicFreq << iSampleRate << iFrameSize << iMicLength; float *pfInput = new float[iMicLength]; float *pfOutput = new float[iFrameSize]; for (int i=0;i