Allocate memory for fftw with fftw_alloc_real/fftw_alloc_complex rather than fftw_malloc

Originally committed to SVN as r5974.
This commit is contained in:
Thomas Goyne 2011-12-06 19:58:44 +00:00
parent b4e3208405
commit 5d8a802e8a
1 changed files with 2 additions and 2 deletions

View File

@ -145,8 +145,8 @@ void AudioSpectrumRenderer::RecreateCache()
cache.reset(new AudioSpectrumCache(block_count, this)); cache.reset(new AudioSpectrumCache(block_count, this));
#ifdef WITH_FFTW #ifdef WITH_FFTW
dft_input = (double*)fftw_malloc(sizeof(double) * (2<<derivation_size)); dft_input = fftw_alloc_real(2<<derivation_size);
dft_output = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * (2<<derivation_size)); dft_output = fftw_alloc_complex(2<<derivation_size);
dft_plan = fftw_plan_dft_r2c_1d( dft_plan = fftw_plan_dft_r2c_1d(
2<<derivation_size, 2<<derivation_size,
dft_input, dft_input,