# HG changeset patch # User Chris Cannam # Date 1171020754 0 # Node ID cec1f78fbfca325381aaab347c0273de396bdfe9 # Parent 1ab31723825daa33456f6a00fc697475c21780bb * Add non-fftw3 fft alternative diff -r 1ab31723825d -r cec1f78fbfca layer/layer.pro --- a/layer/layer.pro Fri Feb 09 09:32:04 2007 +0000 +++ b/layer/layer.pro Fri Feb 09 11:32:34 2007 +0000 @@ -1,6 +1,6 @@ TEMPLATE = lib -SV_UNIT_PACKAGES = +SV_UNIT_PACKAGES = fftw3f load(../sv.prf) CONFIG += sv staticlib qt thread warn_on stl rtti exceptions diff -r 1ab31723825d -r cec1f78fbfca widgets/WindowShapePreview.cpp --- a/widgets/WindowShapePreview.cpp Fri Feb 09 09:32:04 2007 +0000 +++ b/widgets/WindowShapePreview.cpp Fri Feb 09 11:32:34 2007 +0000 @@ -22,7 +22,7 @@ #include #include -#include +#include "data/fft/FFTapi.h" #include @@ -121,18 +121,18 @@ int fftsize = 512; - float *input = (float *)fftwf_malloc(fftsize * sizeof(float)); - fftwf_complex *output = - (fftwf_complex *)fftwf_malloc(fftsize * sizeof(fftwf_complex)); - fftwf_plan plan = fftwf_plan_dft_r2c_1d(fftsize, input, output, + float *input = (float *)fftf_malloc(fftsize * sizeof(float)); + fftf_complex *output = + (fftf_complex *)fftf_malloc(fftsize * sizeof(fftf_complex)); + fftf_plan plan = fftf_plan_dft_r2c_1d(fftsize, input, output, FFTW_ESTIMATE); for (int i = 0; i < fftsize; ++i) input[i] = 0.f; for (int i = 0; i < step * 2; ++i) { input[fftsize/2 - step + i] = windower.getValue(i); } - fftwf_execute(plan); - fftwf_destroy_plan(plan); + fftf_execute(plan); + fftf_destroy_plan(plan); float maxdb = 0.f; float mindb = 0.f; @@ -186,8 +186,8 @@ path.addRect(0, 0, fw, h + 1); freqPainter.drawPath(path); - fftwf_free(input); - fftwf_free(output); + fftf_free(input); + fftf_free(output); freqPainter.setFont(font); label = tr("dB / freq"); diff -r 1ab31723825d -r cec1f78fbfca widgets/widgets.pro --- a/widgets/widgets.pro Fri Feb 09 09:32:04 2007 +0000 +++ b/widgets/widgets.pro Fri Feb 09 11:32:34 2007 +0000 @@ -1,6 +1,6 @@ TEMPLATE = lib -SV_UNIT_PACKAGES = vamp-sdk +SV_UNIT_PACKAGES = vamp-sdk fftw3f load(../sv.prf) CONFIG += sv staticlib qt thread warn_on stl rtti exceptions