Commit 2a46a2fd authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

More cmake switches for reproduction and rendering modules (with some name fixes in code)

parent 3b8f3233
......@@ -129,6 +129,7 @@ add_definitions( -DVABASE_DLL -DITA_DATA_SOURCES_DLL -DITA_BASE_DLL -DITA_CONVOL
add_definitions( "-DVACORE_DEFAULT_LOG_LEVEL=${ITA_VACORE_DEFAULT_DEBUG_LEVEL}" )
add_definitions( "-DVACORE_VERSION_MAJOR=${ITA_VACORE_VERSION_MAJOR}" )
add_definitions( "-DVACORE_VERSION_MINOR=${ITA_VACORE_VERSION_MINOR}" )
if( ${ITA_VACORE_MODULE_INTERFACE_ENABLED} )
add_definitions( "-DVACORE_MODULE_INTERFACE_ENABLED=1" )
endif()
......@@ -141,27 +142,60 @@ endif()
add_definitions( "-DVACORE_MAX_NUM_SOURCES=${ITA_VACORE_MAX_NUM_SOURCES}" )
add_definitions( "-DVACORE_MAX_NUM_LISTENERS=${ITA_VACORE_MAX_NUM_LISTENERS}" )
add_definitions( "-DVACORE_WITH_RENDERER_AMBIENT_MIXER=${ITA_VACORE_WITH_RENDERER_AMBIENT_MIXER}" )
add_definitions( "-DVACORE_WITH_RENDERER_AMBISONICS_FREEFIELD=${ITA_VACORE_WITH_RENDERER_AMBISONICS_FREEFIELD}" )
# Rendering definitions
if( ${ITA_VACORE_WITH_RENDERER_AMBIENT_MIXER} )
add_definitions( "-DVACORE_WITH_RENDERER_AMBIENT_MIXER=1" )
endif()
if( ${ITA_VACORE_WITH_RENDERER_AMBISONICS_FREEFIELD} )
add_definitions( "-DVACORE_WITH_RENDERER_AMBISONICS_FREEFIELD=1" )
endif()
if( ${ITA_VACORE_WITH_RENDERER_BINAURAL_FREEFIELD} )
add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_FREEFIELD=1" )
endif()
add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB=${ITA_VACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB}" )
add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS=${ITA_VACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS}" )
add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE=${ITA_VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE}" )
add_definitions( "-DVACORE_WITH_RENDERER_MONAURAL_FREEFIELD=${ITA_VACORE_WITH_RENDERER_MONAURAL_FREEFIELD}" )
add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_DUMMY=${ITA_VACORE_WITH_RENDERER_PROTOTYPE_DUMMY}" )
add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID=${ITA_VACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID}" )
add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH=${ITA_VACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH}" )
add_definitions( "-DVACORE_WITH_RENDERER_VBAP_FREEFIELD=${ITA_VACORE_WITH_RENDERER_VBAP_FREEFIELD}" )
add_definitions( "-DVACORE_WITH_REPRODUCTION_TALKTHROUGH=${ITA_VACORE_WITH_REPRODUCTION_TALKTHROUGH}" )
add_definitions( "-DVACORE_WITH_REPRODUCTION_HEADPHONES=${ITA_VACORE_WITH_REPRODUCTION_HEADPHONES}" )
add_definitions( "-DVACORE_WITH_REPRODUCTION_AMBISONICS=${ITA_VACORE_WITH_REPRODUCTION_AMBISONICS}" )
add_definitions( "-DVACORE_WITH_REPRODUCTION_BINAURAL_NCTC=${ITA_VACORE_WITH_REPRODUCTION_BINAURAL_NCTC}" )
add_definitions( "-DVACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN=${ITA_VACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN}" )
add_definitions( "-DVACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN=${ITA_VACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN}" )
if( ${ITA_VACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB} )
add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB=1" )
endif()
if( ${ITA_VACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS} )
add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS=1" )
endif()
if( ${ITA_VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE} )
add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE=1" )
endif()
if( ${ITA_VACORE_WITH_RENDERER_MONAURAL_FREEFIELD} )
add_definitions( "-DVACORE_WITH_RENDERER_MONAURAL_FREEFIELD=1" )
endif()
if( ${ITA_VACORE_WITH_RENDERER_PROTOTYPE_DUMMY} )
add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_DUMMY=1" )
endif()
if( ${ITA_VACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID} )
add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID=1" )
endif()
if( ${ITA_VACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH} )
add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH=1" )
endif()
if( ${ITA_VACORE_WITH_RENDERER_VBAP_FREEFIELD} )
add_definitions( "-DVACORE_WITH_RENDERER_VBAP_FREEFIELD=1" )
endif()
# Reproduction definitions
if( ${ITA_VACORE_WITH_REPRODUCTION_TALKTHROUGH} )
add_definitions( "-DVACORE_WITH_REPRODUCTION_TALKTHROUGH=1" )
endif()
if( ${ITA_VACORE_WITH_REPRODUCTION_HEADPHONES} )
add_definitions( "-DVACORE_WITH_REPRODUCTION_HEADPHONES=1" )
endif()
if( ${DVACORE_WITH_REPRODUCTION_AMBISONICS} )
add_definitions( "-ITA_VACORE_WITH_REPRODUCTION_AMBISONICS=1" )
endif()
if( ${ITA_VACORE_WITH_REPRODUCTION_BINAURAL_NCTC} )
add_definitions( "-DVACORE_WITH_REPRODUCTION_BINAURAL_NCTC=1" )
endif()
if( ${ITA_VACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN} )
add_definitions( "-DVACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN=1" )
endif()
if( ${ITA_VACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN} )
add_definitions( "-DVACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN=1" )
endif()
string( TIMESTAMP VACORE_CMAKE_DATE "%Y-%m-%d" )
add_definitions( "-DVACORE_CMAKE_DATE=\"${VACORE_CMAKE_DATE}\"" )
......
......@@ -25,7 +25,7 @@
#ifndef __VA_AMBISONICSFREEFIELDAUDIORENDERER__
#define __VA_AMBISONICSFREEFIELDAUDIORENDERER__
#if ( VACORE_RENDERER_AMBISONICS_FREEFIELD == 1 )
#if ( VACORE_WITH_RENDERER_AMBISONICS_FREEFIELD == 1 )
// VA includes
#include "../../../Filtering/VAVariableDelayLine.h"
......@@ -145,6 +145,6 @@ private:
VA_REGISTER_AUDIO_RENDERER( CVAAmbisonicsFreefieldAudioRenderer, "AmbisonicsFreefield" );
#endif // (VACORE_RENDERER_AMBISONICS_FREEFIELD==1)
#endif // ( VACORE_WITH_RENDERER_AMBISONICS_FREEFIELD == 1 )
#endif // __VA_AMBISONICSFREEFIELDAUDIORENDERER__
......@@ -1517,6 +1517,4 @@ void CVABATNSoundPath::UpdateHRIR()
return;
}
#endif // ( VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE == 1 )
......@@ -23,7 +23,7 @@
#ifndef __VA_BINAURALAIRTRAFFICNOISEAUDIORENDERER__
#define __VA_BINAURALAIRTRAFFICNOISEAUDIORENDERER__
#if ( VACORE_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE == 1 )
#if ( VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE == 1 )
// VA includes
#include <VAObject.h>
......@@ -320,6 +320,6 @@ private:
VA_REGISTER_AUDIO_RENDERER( CVABinauralAirTrafficNoiseAudioRenderer, "BinauralAirTrafficNoise" );
#endif // ( VACORE_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE == 1 )
#endif // ( VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE == 1 )
#endif // __VA_BINAURALAIRTRAFFICNOISEAUDIORENDERER__
......@@ -25,7 +25,7 @@
#ifndef __VA_BINAURALARTIFICIALREVERBDAUDIORENDERER__
#define __VA_BINAURALARTIFICIALREVERBDAUDIORENDERER__
#if( VACORE_RENDERER_BINAURAL_ARTIFICIAL_REVERB==1 )
#if( VACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB == 1 )
// VA includes
#include <VABaseDefinitions.h>
......@@ -287,6 +287,6 @@ private:
VA_REGISTER_AUDIO_RENDERER( CVABinauralArtificialReverbAudioRenderer, "BinauralArtificialReverb" );
#endif // (VACORE_RENDERER_BINAURAL_ARTIFICIAL_REVERB==1)
#endif // ( VACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB == 1 )
#endif // __VA_BINAURALARTIFICIALREVERBDAUDIORENDERER__
#include "VABinauralMixdownReproduction.h"
#if (VACORE_REPRODUCTION_BINAURAL_MIXDOWN==1 )
#if ( VACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN == 1 )
#include "VAHRIRDataset.h>
#include <Scene/VAListenerState.h>
#include <Scene/VAMotionState.h>
#include <Scene/VASceneState.h>
#include <Utils/VAUtils.h>
#include <VAHardwareSetup.h>
#include "../../Data/VAHRIRDataset.h"
#include "../../Scene/VAListenerState.h"
#include "../../Scene/VAMotionState.h"
#include "../../Scene/VASceneState.h"
#include "../../Utils/VAUtils.h"
#include "../../VAHardwareSetup.h"
#include <DSMBCConvolver.h>
#include <DSMBCFilterPool.h>
......@@ -21,9 +21,10 @@
#include <VistaBase/VistaVector3D.h>
#include <xutility>
#include <FastMath.h>
#include <ITAFastMath.h>
class StreamFilter : public ITADatasourceRealization {
class StreamFilter : public ITADatasourceRealization
{
public:
ITADatasource* pdsInput;
DSMBCFilterPool* pFilterPool;
......@@ -50,7 +51,7 @@ CVABinauralMixdownReproduction::CVABinauralMixdownReproduction( const CVAAudioRe
conf.OptInteger( "HRIRFilterLength", m_iHRIRFilterLength, 128 );
double dSampleRate = m_oParams.pCore->GetCoreConfig()->oAudioDriverConfig.dSamplerate;
m_sfHRIRTemp.init( dSampleRate, 2, m_iHRIRFilterLength, true );
m_sfHRIRTemp.init( 2, m_iHRIRFilterLength, true );
// Validate outputs
for( size_t i=0; i<m_oParams.vpOutputs.size(); i++ )
......@@ -150,7 +151,7 @@ void CVABinauralMixdownReproduction::UpdateScene( CVASceneState* pNewState )
if( m_sfHRIRTemp.length() != iHRIRFilterLength )
{
double dSampleRate = m_oParams.pCore->GetCoreConfig()->oAudioDriverConfig.dSamplerate;
m_sfHRIRTemp.init( dSampleRate, 2, iHRIRFilterLength, false );
m_sfHRIRTemp.init( 2, iHRIRFilterLength, false );
}
int iIndex;
pHRIRSet->GetNearestNeighbour( float( dAzimuth ), float( dElevation ), &iIndex );
......@@ -249,4 +250,4 @@ void StreamFilter::PostIncrementBlockPointer()
pdsInput->IncrementBlockPointer();
}
#endif // VACORE_REPRODUCTION_BINAURAL_MIXDOWN
\ No newline at end of file
#endif // VACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN
\ No newline at end of file
......@@ -3,10 +3,10 @@
#if ( VACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN == 1 )
#include <Reproduction/VAAudioReproductionModule.h>
#include <Reproduction/VAAudioReproductionModuleRegistry.h>
#include <VACoreImpl.h>
#include <Scene/VAMotionState.h>
#include "../VAAudioReproductionModule.h"
#include "../VAAudioReproductionModuleRegistry.h"
#include "../../VACoreImpl.h"
#include "../../Scene/VAMotionState.h"
#include <ITASampleFrame.h>
......@@ -57,5 +57,6 @@ private:
VA_REGISTER_AUDIO_REPRODUCTION_MODULE_CLASS( CVABinauralMixdownReproduction, "BinauralMixdown" )
#endif // VACORE_REPRODUCTION_BINAURAL_MIXDOWN
#endif // ( VACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN == 1 )
#endif // __VA_BINAURALDOWNMIXREPRODUCTION_H__
#include "VAReproductionTalkthrough.h"
#if ( VACORE_REPRODUCTION_TALKTHROUGH == 1 )
#if ( VACORE_WITH_REPRODUCTION_TALKTHROUGH == 1 )
#include "../../VACoreImpl.h"
#include <ITAFastMath.h>
......@@ -67,4 +67,4 @@ int CVAReproductionTalkthrough::GetNumInputChannels() const
return m_pdsOutputDatasource->GetNumberOfChannels();
}
#endif // ( VACORE_REPRODUCTION_TALKTHROUGH == 1 )
\ No newline at end of file
#endif // ( VACORE_WITH_REPRODUCTION_TALKTHROUGH == 1 )
\ No newline at end of file
......@@ -29,6 +29,6 @@ private:
VA_REGISTER_AUDIO_REPRODUCTION_MODULE_CLASS( CVAReproductionTalkthrough, "Talkthrough" )
#endif // ( VACORE_REPRODUCTION_TALKTHROUGH == 1 )
#endif // ( VACORE_WITH_REPRODUCTION_TALKTHROUGH == 1 )
#endif // __VA_REPRODUCTIONTALKTHROUGH_H__
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