Commits (3)
HTML
*.bat
*.mat
*.pdf
*.dll
*.exe
*.so*
Thumbs.db
.DS_Store
*.asv
*.wav
*.xlsx
*.docx
*.dll
*.csv
*.h5
*.ita
*.fig
*.png
*.jpeg
*.sofa
*.spk
*.unv
*.stl
svnaccess
*.lib
*.exp
......@@ -13,29 +13,21 @@ vista_use_package( ITADataSources REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITAConvolution REQUIRED FIND_DEPENDENCIES )
vista_use_package( OpenDAFF REQUIRED )
if( NOT DEFINED ITA_CORE_LIBS_BUILD_STATIC )
set( ITA_CORE_LIBS_BUILD_STATIC OFF CACHE BOOL "Build all ITA core libs in static mode" )
endif( NOT DEFINED ITA_CORE_LIBS_BUILD_STATIC )
if( NOT DEFINED ITA_VISTA_BUILD_STATIC )
set( ITA_VISTA_BUILD_STATIC OFF CACHE BOOL "Build against static ViSTA libraries" )
endif( NOT DEFINED ITA_VISTA_BUILD_STATIC )
if( NOT DEFINED ITA_CTC_WITH_DUAL_CTC )
set( ITA_CTC_WITH_DUAL_CTC OFF CACHE BOOL "Build support for Crosstalk-Cancellation with arbitrary loudspeaker number and pose" )
endif( NOT DEFINED ITA_CTC_WITH_DUAL_CTC )
endif( )
if( NOT DEFINED ITA_CTC_WITH_N_CTC )
set( ITA_CTC_WITH_N_CTC ON CACHE BOOL "Build support for two-loudspeaker Crosstalk-Cancellation (deprecated)" )
endif( NOT DEFINED ITA_CTC_WITH_N_CTC )
endif( )
if( NOT DEFINED ITA_CTC_WITH_QUAD_CTC )
set( ITA_CTC_WITH_QUAD_CTC OFF CACHE BOOL "Build support for quad-loudspeaker Crosstalk-Cancellation (deprecated)" )
endif( NOT DEFINED ITA_CTC_WITH_QUAD_CTC )
endif( )
if( NOT DEFINED ITA_CTC_NCTC_EXPORT_FILTER_TO_HARDDRIVE )
set( ITA_CTC_NCTC_EXPORT_FILTER_TO_HARDDRIVE OFF CACHE BOOL "Export HRIR input,, intermediate results and final CTC filter set to harddrive (as multi-channel WAV files)" )
endif( NOT DEFINED ITA_CTC_NCTC_EXPORT_FILTER_TO_HARDDRIVE )
endif( )
# includes
......@@ -49,44 +41,37 @@ set( ITACTCSources )
if( ITA_CTC_WITH_DUAL_CTC )
set( ITACTCHeader "${ITACTCHeader}" "include/ITADualCTC.h" "include/ITADualCTCStreamFilter.h" )
set( ITACTCSources "${ITACTCSources}" "src/ITADualCTC.cpp" "src/ITADualCTCStreamFilter.cpp" )
endif( ITA_CTC_WITH_DUAL_CTC )
endif( )
if( ITA_CTC_WITH_N_CTC )
set( ITACTCHeader "${ITACTCHeader}" "include/ITANCTC.h" "include/ITANCTCStreamFilter.h" )
set( ITACTCSources "${ITACTCSources}" "src/ITANCTC.cpp" "src/ITANCTCStreamFilter.cpp" )
endif( ITA_CTC_WITH_N_CTC )
endif( )
if( ITA_CTC_WITH_QUAD_CTC )
set( ITACTCHeader "${ITACTCHeader}" "include/ITAQuadCTC.h" "include/ITAQuadCTCStreamFilter.h" )
set( ITACTCSources "${ITACTCSources}" "src/ITAQuadCTC.cpp" "src/ITAQuadCTCStreamFilter.cpp" )
endif( ITA_CTC_WITH_QUAD_CTC )
endif( )
if( ITA_CTC_NCTC_EXPORT_FILTER_TO_HARDDRIVE )
add_definitions( -DNCTC_EXPORT_FILTER_TO_HARDDRIVE )
endif( ITA_CTC_NCTC_EXPORT_FILTER_TO_HARDDRIVE )
endif( )
# compiler settings
if( ITA_VISTA_BUILD_STATIC )
add_definitions( -DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTATOOLS_STATIC -DVISTAINTERPROCCOMM_STATIC )
endif( ITA_VISTA_BUILD_STATIC )
endif( )
if( NOT ITA_CORE_LIBS_BUILD_STATIC )
if( BUILD_SHARED_LIBS )
add_definitions( -DITA_CTC_EXPORT )
else( NOT ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_FFT_STATIC -DITA_BASE_STATIC -DITA_CONVOLUTION_STATIC -DITA_CTC_STATIC )
set( BUILD_SHARED_LIBS_TEMP ${BUILD_SHARED_LIBS} )
if( BUILD_SHARED_LIBS )
set( BUILD_SHARED_LIBS OFF )
message( "Ignoring activated BUILD_SHARED_LIBS temporary because static ITA core libs requested" )
endif( BUILD_SHARED_LIBS )
endif( NOT ITA_CORE_LIBS_BUILD_STATIC )
else( )
add_definitions( -DITA_CTC_STATIC -DITA_CONVOLUTION_STATIC -DITA_FFT_STATIC -DITA_BASE_STATIC -DITA_DATA_SOURCES_STATIC )
endif( )
# linker
add_library( ITACTC ${ITACTCHeader} ${ITACTCSources} )
target_link_libraries( ITACTC ${VISTA_USE_PACKAGE_LIBRARIES} )
set( BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_TEMP} )
# configure
vista_configure_lib( ITACTC )
......@@ -99,5 +84,7 @@ set_property( TARGET ITACTC PROPERTY FOLDER "ITACoreLibs" )
# tests
set( ITACTC_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
if( ITA_CORE_LIBS_WITH_TESTS )
set( ITACTC_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
endif( )
......@@ -12,6 +12,7 @@
#include <ITAHDFTSpectrum.h>
#include <ITANumericUtils.h>
#include <ITAStringUtils.h>
#include <ITAFFTUtils.h>
ITANCTC::ITANCTC( const Config& oNCTCConfig )
: m_oConfig( oNCTCConfig )
......@@ -224,7 +225,7 @@ bool ITANCTC::CalculateFilter( std::vector< ITAHDFTSpectra* >& vpCTCFilter )
m_fft.execute( m_sfCTC_temp[ 1 ].data(), ( *pHRTF )[ 1 ]->data() );
#ifdef NCTC_EXPORT_FILTER_TO_HARDDRIVE
pHRTF->Export( "HRIR_LS" + IntToString( n+1 ) + "_RAW" );
ITAFFTUtils::Export(pHRTF, "HRIR_LS" + IntToString(n + 1) + "_RAW");
#endif // NCTC_EXPORT_FILTER_TO_HARDDRIVE
}
......@@ -289,7 +290,7 @@ bool ITANCTC::CalculateFilter( std::vector< ITAHDFTSpectra* >& vpCTCFilter )
#ifdef NCTC_EXPORT_FILTER_TO_HARDDRIVE
pHRTF->Export( "HRIR_LS" + IntToString( n + 1 ) + "_WICKed" );
ITAFFTUtils::Export(pHRTF, "HRIR_LS" + IntToString(n + 1) + "_WICKed");
#endif // NCTC_EXPORT_FILTER_TO_HARDDRIVE
// --- CTC compensation factor ---
......@@ -308,7 +309,7 @@ bool ITANCTC::CalculateFilter( std::vector< ITAHDFTSpectra* >& vpCTCFilter )
(*pHRTF)[1]->mul(fRightChannelCTC);
#ifdef NCTC_EXPORT_FILTER_TO_HARDDRIVE
pHRTF->Export("HRIR_LS" + IntToString(n + 1) + "_WICKedPlusCTCFactor");
ITAFFTUtils::Export(pHRTF, "HRIR_LS" + IntToString(n + 1) + "_WICKedPlusCTCFactor");
#endif // NCTC_EXPORT_FILTER_TO_HARDDRIVE
// --- Weighting ---
......@@ -406,7 +407,7 @@ bool ITANCTC::CalculateFilter( std::vector< ITAHDFTSpectra* >& vpCTCFilter )
( *pCTCFilter )[ 1 ]->add( t );
#ifdef NCTC_EXPORT_FILTER_TO_HARDDRIVE
pCTCFilter->Export( "CTCFilter_noshift_" + IntToString( n+1 ) );
ITAFFTUtils::Export(pCTCFilter, "CTCFilter_noshift_" + IntToString(n + 1));
#endif // NCTC_EXPORT_FILTER_TO_HARDDRIVE
......@@ -427,7 +428,7 @@ bool ITANCTC::CalculateFilter( std::vector< ITAHDFTSpectra* >& vpCTCFilter )
m_fft.execute( sfTargetData_shift[ 1 ].data(), ( *pCTCFilter )[ 1 ]->data() );
#ifdef NCTC_EXPORT_FILTER_TO_HARDDRIVE
pCTCFilter->Export( "CTCFilter_shift_" + IntToString( n+1 ) );
ITAFFTUtils::Export(pCTCFilter, "CTCFilter_shift_" + IntToString(n + 1));
#endif // NCTC_EXPORT_FILTER_TO_HARDDRIVE
}
......