Linux compat

parent ed64d04a
......@@ -67,6 +67,10 @@ else( )
add_definitions( -DITA_CTC_STATIC -DITA_CONVOLUTION_STATIC -DITA_FFT_STATIC -DITA_BASE_STATIC -DITA_DATA_SOURCES_STATIC )
endif( )
if( NOT WIN32 )
add_definitions( -std=gnu++11)
endif( )
# linker
add_library( ITACTC ${ITACTCHeader} ${ITACTCSources} )
......
......@@ -28,7 +28,7 @@
#include <ITAAtomicPrimitives.h>
#include <ITAFFT.h>
#include <ITASampleFrame.h>
#include <ITAStopwatch.h>
#include <ITAStopWatch.h>
#include <ITAHDFTSpectra.h>
#include <VistaBase/VistaVector3D.h>
......
......@@ -264,12 +264,12 @@ bool ITANCTC::CalculateFilter( std::vector< ITAHDFTSpectra* >& vpCTCFilter )
for( int i = 0; i < ( *pHRTF )[ 0 ]->getSize(); i++ )
{
float fMag = ( *pHRTF )[ 0 ]->calcMagnitude( i );
( *pHRTF )[ 0 ]->setMagnitudePreservePhase( i, std::powf( fMag, m_fWaveIncidenceAngleCompensationFactor ) );
( *pHRTF )[ 0 ]->setMagnitudePreservePhase( i, std::pow( fMag, m_fWaveIncidenceAngleCompensationFactor ) );
}
// Compensate initial HRTF energy when WICK is used (left channel)
assert( fEnergy > 0 );
float fEnergyCompensation = std::powf( fEnergy, ( 1 - m_fWaveIncidenceAngleCompensationFactor ) );
float fEnergyCompensation = std::pow( fEnergy, ( 1 - m_fWaveIncidenceAngleCompensationFactor ) );
( *pHRTF )[ 0 ]->mul( fEnergyCompensation );
......@@ -280,12 +280,12 @@ bool ITANCTC::CalculateFilter( std::vector< ITAHDFTSpectra* >& vpCTCFilter )
for( int i = 0; i < ( *pHRTF )[ 1 ]->getSize(); i++ )
{
float fMag = ( *pHRTF )[ 1 ]->calcMagnitude( i );
( *pHRTF )[ 1 ]->setMagnitudePreservePhase( i, std::powf( fMag, m_fWaveIncidenceAngleCompensationFactor ) );
( *pHRTF )[ 1 ]->setMagnitudePreservePhase( i, std::pow( fMag, m_fWaveIncidenceAngleCompensationFactor ) );
}
// Compensate initial HRTF energy when WICK is used (right channel)
assert( fEnergy > 0 );
fEnergyCompensation = std::powf( fEnergy, ( 1 - m_fWaveIncidenceAngleCompensationFactor ) );
fEnergyCompensation = std::pow( fEnergy, ( 1 - m_fWaveIncidenceAngleCompensationFactor ) );
( *pHRTF )[ 1 ]->mul( fEnergyCompensation );
......
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