......@@ -11,6 +11,11 @@ vista_use_package( fftw )
vista_use_package( MKL )
#vista_find_package( FFTS )
if ( NOT WIN32 )
vista_use_package ( Threads REQUIRED )
list ( APPEND VISTA_USE_PACKAGE_LIBRARIES pthread )
endif ()
if( NOT DEFINED ITA_FFT_WITH_FFTW3 )
set( ITA_FFT_WITH_FFTW3 ON CACHE BOOL "Build with FFTW3 for fast fourier transforms" )
endif( )
......
......@@ -9,13 +9,13 @@
ITA_FFT_API void ITAFFTUtils::Convert( const ITAHDFTSpectrum* pSpectrum, ITASampleBuffer& sbIR )
{
sbIR.Init( pSpectrum->getDFTSize() - 1, true );
ITASampleBuffer sbSpectrum( pSpectrum->getDFTSize(), true ); // local copy
sbIR.Init( pSpectrum->GetDFTSize() - 1, true );
ITASampleBuffer sbSpectrum( pSpectrum->GetDFTSize(), true ); // local copy
ITAFFT ifft( ITAFFT::IFFT_C2R, sbIR.length(), sbSpectrum.GetData(), sbIR.GetData() );
// Make local copy of input (will be destroyed by in-place FFT)
sbSpectrum.write( pSpectrum->data(), sbSpectrum.length() );
sbSpectrum.write( pSpectrum->GetData(), sbSpectrum.length() );
float* fIn = sbSpectrum.GetData();
float* fOut = sbIR.GetData();
ifft.execute( fIn, fOut );
......@@ -36,7 +36,7 @@ ITA_FFT_API void ITAFFTUtils::Convert( const ITAHDFTSpectra* pSpectra, ITASample
for( int i = 0; i < pSpectra->GetNumChannels(); i++ )
{
// Make local copy of input (will be destroyed by in-place FFT)
sbSourceData.write( ( *pSpectra )[ i ]->data(), sbSourceData.GetLength() );
sbSourceData.write( ( *pSpectra )[ i ]->GetData(), sbSourceData.GetLength() );
float* fIn = sbSourceData.GetData();
float* fOut = sfIR[ i ].GetData();
ifft.execute( fIn, fOut );
......@@ -60,7 +60,7 @@ ITA_FFT_API void ITAFFTUtils::Export( const ITAHDFTSpectrum* pSpectrum, const st
if( bNormalize )
sbIR.Normalize();
writeAudiofile( sFilePathFinal, &sbIR, pSpectrum->getSamplerate(), ITAQuantization::ITA_FLOAT );
writeAudiofile( sFilePathFinal, &sbIR, pSpectrum->GetSampleRate(), ITAQuantization::ITA_FLOAT );
return;
}
......