Introducing ITABaser namespace, starting with data classes

parent 166291a5
......@@ -21,11 +21,11 @@
#include <ITAFFTDefinitions.h>
#include <ITAHDFTSpectra.h>
#include <ITAHDFTSpectrum.h>
#include <ITASampleBuffer.h>
#include <ITASampleFrame.h>
class ITAHDFTSpectrum;
class ITAHDFTSpectra;
namespace ITAFFTUtils
{
......@@ -35,7 +35,7 @@ namespace ITAFFTUtils
* \param[out] sfIR Impulse response in time domain
* \param[in] bNormalize Normalize time data
*/
ITA_FFT_API void Convert( const ITAHDFTSpectrum* pFreqDomainSpectrum, ITASampleBuffer& sfIR);
ITA_FFT_API void Convert( const ITABase::CHDFTSpectrum* pFreqDomainSpectrum, ITASampleBuffer& sfIR );
//! Convert a multi-channel HDFT spectrum into time-domain representation
/**
......@@ -43,7 +43,7 @@ namespace ITAFFTUtils
* \param[out] sfIR Impulse response in time domain
* \param[in] bNormalize Normalize time data
*/
ITA_FFT_API void Convert( const ITAHDFTSpectra* pFreqDomainSpectra, ITASampleFrame& sfIR );
ITA_FFT_API void Convert( const ITABase::CHDFTSpectra* pFreqDomainSpectra, ITASampleFrame& sfIR );
//! Export a single-channel HDFT spectrum as a WAV file
/**
......@@ -51,7 +51,7 @@ namespace ITAFFTUtils
* \param[in] sFilePath File path with or without wav extension
* \param[in] bNormalize Normalize time data
*/
ITA_FFT_API void Export( const ITAHDFTSpectrum* pFreqDomainSpectrum, const std::string& sFilePath, bool bNormalize = false );
ITA_FFT_API void Export( const ITABase::CHDFTSpectrum* pFreqDomainSpectrum, const std::string& sFilePath, bool bNormalize = false );
//! Export a multi-channel HDFT spectrum as a WAV file
/**
......@@ -59,7 +59,7 @@ namespace ITAFFTUtils
* \param[in] sFilePath File path with or without wav extension
* \param[in] bNormalize Normalize time data
*/
ITA_FFT_API void Export( const ITAHDFTSpectra* pFreqDomainSpectra, const std::string& sFilePath, bool bNormalize = false );
ITA_FFT_API void Export( const ITABase::CHDFTSpectra* pFreqDomainSpectra, const std::string& sFilePath, bool bNormalize = false );
};
#endif // INCLUDE_WATCHER_ITA_FFT_UTILS
#include <ITAFFTUtils.h>
#include <ITAHDFTSpectra.h>
#include <ITAHDFTSpectrum.h>
#include <ITAAudiofileWriter.h>
#include <ITAFileSystemUtils.h>
#include <ITAFFT.h>
ITA_FFT_API void ITAFFTUtils::Convert( const ITAHDFTSpectrum* pSpectrum, ITASampleBuffer& sbIR )
void ITAFFTUtils::Convert( const ITABase::CHDFTSpectrum* pSpectrum, ITASampleBuffer& sbIR )
{
sbIR.Init( pSpectrum->GetDFTSize() - 1, true );
ITASampleBuffer sbSpectrum( pSpectrum->GetDFTSize(), true ); // local copy
......@@ -26,7 +24,7 @@ ITA_FFT_API void ITAFFTUtils::Convert( const ITAHDFTSpectrum* pSpectrum, ITASamp
return;
}
ITA_FFT_API void ITAFFTUtils::Convert( const ITAHDFTSpectra* pSpectra, ITASampleFrame& sfIR )
void ITAFFTUtils::Convert( const ITABase::CHDFTSpectra* pSpectra, ITASampleFrame& sfIR )
{
sfIR.Init( pSpectra->GetNumChannels(), pSpectra->GetDFTSize() - 1, true );
ITASampleBuffer sbSourceData( pSpectra->GetDFTSize(), true ); // local copy
......@@ -48,7 +46,7 @@ ITA_FFT_API void ITAFFTUtils::Convert( const ITAHDFTSpectra* pSpectra, ITASample
return;
}
ITA_FFT_API void ITAFFTUtils::Export( const ITAHDFTSpectrum* pSpectrum, const std::string& sFilePath, bool bNormalize /*= false */ )
void ITAFFTUtils::Export( const ITABase::CHDFTSpectrum* pSpectrum, const std::string& sFilePath, bool bNormalize /*= false */ )
{
std::string sFilePathComplete = sFilePath;
if( getFilenameSuffix( sFilePath ).empty() )
......@@ -65,7 +63,7 @@ ITA_FFT_API void ITAFFTUtils::Export( const ITAHDFTSpectrum* pSpectrum, const st
return;
}
ITA_FFT_API void ITAFFTUtils::Export( const ITAHDFTSpectra* pSpectra, const std::string& sFilePath, bool bNormalize /*= false */ )
void ITAFFTUtils::Export( const ITABase::CHDFTSpectra* pSpectra, const std::string& sFilePath, bool bNormalize /*= false */ )
{
std::string sFilePathComplete = sFilePath;
if( getFilenameSuffix( sFilePath ).empty() )
......
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