Applying HDFT spectrum API changes

parent 64b4df38
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment