Commit 32f685c1 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

starting configuration transfer of VACore into CMake

parent 281e8d2c
......@@ -19,6 +19,92 @@ vista_use_package( ITAConvolution REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITACTC REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITASampler REQUIRED FIND_DEPENDENCIES )
# Version
if( NOT DEFINED ITA_VACORE_VERSION_MAJOR )
set( ITA_VACORE_VERSION_MAJOR 1 CACHE INT "VACore version major" )
endif( NOT DEFINED ITA_VACORE_VERSION_MAJOR )
if( NOT DEFINED ITA_VACORE_VERSION_MINOR )
set( ITA_VACORE_VERSION_MINOR 24 CACHE INT "VACore version minor" )
endif( NOT DEFINED ITA_VACORE_VERSION_MINOR )
# Settings
if( NOT DEFINED ITA_VACORE_DEFAULT_DEBUG_LEVEL )
set( ITA_VACORE_DEFAULT_DEBUG_LEVEL 3 CACHE INT "Default VACore debug level (0-5)" )
endif( NOT DEFINED ITA_VACORE_DEFAULT_DEBUG_LEVEL )
if( NOT DEFINED ITA_VACORE_MODULE_INTERFACE_ENABLED )
set( ITA_VACORE_MODULE_INTERFACE_ENABLED ON CACHE BOOL "Build VACore with module interface" )
endif( NOT DEFINED ITA_VACORE_MODULE_INTERFACE_ENABLED )
if( NOT DEFINED ITA_VACORE_NO_MODULE_INTERFACE_THROW_EXCEPTION )
set( ITA_VACORE_NO_MODULE_INTERFACE_THROW_EXCEPTION ON CACHE BOOL "Throw exception during module call attempt if VACore was build without module interface" )
endif( NOT DEFINED ITA_VACORE_NO_MODULE_INTERFACE_THROW_EXCEPTION )
# Rendering modules
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_AMBIENT_MIXER )
set( ITA_VACORE_WITH_RENDERER_AMBIENT_MIXER ON CACHE BOOL "Build VACore with rendering module: ambient mixer" )
endif( NOT DEFINED ITA_VACORE_WITH_RENDERER_AMBIENT_MIXER )
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_AMBISONICS_FREEFIELD )
set( ITA_VACORE_WITH_RENDERER_AMBISONICS_FREEFIELD ON CACHE BOOL "Build VACore with rendering module: ambisonics free-field" )
endif( NOT DEFINED ITA_VACORE_WITH_RENDERER_AMBISONICS_FREEFIELD )
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_FREEFIELD )
set( ITA_VACORE_WITH_RENDERER_BINAURAL_FREEFIELD ON CACHE BOOL "Build VACore with rendering module: binaural free-field" )
endif( NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_FREEFIELD )
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB )
set( ITA_VACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB ON CACHE BOOL "Build VACore with rendering module: artificial reverb" )
endif( NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB )
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS )
set( ITA_VACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS OFF CACHE BOOL "Build VACore with rendering module: room acoustics (RAVEN)" )
endif( NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS )
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE )
set( ITA_VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE ON CACHE BOOL "Build VACore with rendering module: air traffic noise (VATSS)" )
endif( NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE )
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_MONAURAL_FREEFIELD )
set( ITA_VACORE_WITH_RENDERER_MONAURAL_FREEFIELD ON CACHE BOOL "Build VACore with rendering module: monaural free-field" )
endif( NOT DEFINED ITA_VACORE_WITH_RENDERER_MONAURAL_FREEFIELD )
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_PROTOTYPE_DUMMY )
set( ITA_VACORE_WITH_RENDERER_PROTOTYPE_DUMMY OFF CACHE BOOL "Build VACore with rendering module: prototype dummy" )
endif( NOT DEFINED ITA_VACORE_WITH_RENDERER_PROTOTYPE_DUMMY )
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID )
set( ITA_VACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID OFF CACHE BOOL "Build VACore with rendering module: prototype hearing aid (iCARE)" )
endif( NOT DEFINED ITA_VACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID )
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH )
set( ITA_VACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH ON CACHE BOOL "Build VACore with rendering module: prototype generic path" )
endif( NOT DEFINED ITA_VACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH )
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_VBAP_FREEFIELD )
set( ITA_VACORE_WITH_RENDERER_VBAP_FREEFIELD OFF CACHE BOOL "Build VACore with rendering module: vector-base amplitude panning free-field" )
endif( NOT DEFINED ITA_VACORE_WITH_RENDERER_VBAP_FREEFIELD )
# Reproduction modules
if( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_TALKTHROUGH )
set( ITA_VACORE_WITH_REPRODUCTION_TALKTHROUGH ON CACHE BOOL "Build VACore with reproduction module: talkthrough" )
endif( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_TALKTHROUGH )
if( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_HEADPHONES )
set( ITA_VACORE_WITH_REPRODUCTION_HEADPHONES ON CACHE BOOL "Build VACore with reproduction module: headphones (equalization)" )
endif( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_HEADPHONES )
if( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_AMBISONICS )
set( ITA_VACORE_WITH_REPRODUCTION_AMBISONICS ON CACHE BOOL "Build VACore with reproduction module: ambisonics (B-format decoder)" )
endif( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_AMBISONICS )
if( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_BINAURAL_NCTC )
set( ITA_VACORE_WITH_REPRODUCTION_BINAURAL_NCTC ON CACHE BOOL "Build VACore with reproduction module: binaural N-CTC" )
endif( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_BINAURAL_NCTC )
if( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN )
set( ITA_VACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN ON CACHE BOOL "Build VACore with reproduction module: binaural mixdown" )
endif( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN )
if( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN )
set( ITA_VACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN ON CACHE BOOL "Build VACore with reproduction module: ambisonics binaural mixdown (B-format decoder)" )
endif( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN )
# Including the source files of all source subfolders recursively
include( "include/_SourceFiles.cmake" )
include( "src/_SourceFiles.cmake" )
......@@ -28,6 +114,8 @@ include_directories( "include" )
add_definitions( -DIEEE754_64FLOAT=1 )
add_definitions( -DVABASE_DLL -DITA_DATA_SOURCES_DLL -DITA_BASE_DLL -DITA_CONVOLUTION_DLL -DITA_CTC_DLL -DITA_SAMPLER_DLL -DVACORE_DLL -DVACORE_EXPORTS )
add_definitions( "-DVACORE_DEFAULT_LOG_LEVEL=${ITA_VACORE_DEFAULT_DEBUG_LEVEL}" )
add_library( VACore ${ProjectSources} )
target_link_libraries( VACore
${VISTA_USE_PACKAGE_LIBRARIES} # contains all libraries from vista_use_package() calls
......
#include "VAAmbisonicsFreefieldAudioRenderer.h"
#if (VACORE_RENDERER_AMBISONICS_FREEFIELD==1)
#if ( VACORE_RENDERER_AMBISONICS_FREEFIELD == 1 )
#include "../../../Scene/VAScene.h"
#include "../../../Utils/VAUtils.h"
......
......@@ -4,21 +4,21 @@
#if ( VACORE_RENDERER_PROTOTYPE_HEARING_AID == 1 )
// VA includes
#include "VADirectivity.h>
#include "VAHRIRDataset.h>
#include <Filtering/VAAtmosphere.h>
#include <Filtering/VAThirdOctaveFilterbank.h>
#include <Filtering/VAVariableDelayLine.h>
#include <Motion/VAMotionModelBase.h>
#include <Motion/VASharedMotionModel.h>
#include <Motion/VASampleAndHoldMotionModel.h>
#include <Scene/VAScene.h>
#include <Utils/VAUtils.h>
#include <VAAudiostreamTracker.h>
#include "../../../Data/VADirectivity.h"
#include "../../../Data/VAHRIRDataset.h"
#include "../../../Filtering/VAAtmosphere.h"
#include "../../../Filtering/VAThirdOctaveFilterbank.h"
#include "../../../Filtering/VAVariableDelayLine.h"
#include "../../../Motion/VAMotionModelBase.h"
#include "../../../Motion/VASharedMotionModel.h"
#include "../../../Motion/VASampleAndHoldMotionModel.h"
#include "../../../Scene/VAScene.h"
#include "../../../Utils/VAUtils.h"
#include "../../../VAAudiostreamTracker.h"
#include <VACore.h>
#include <VACoreImpl.h>
#include <VACoreConfig.h>
#include <VALog.h>
#include "../../../VACoreImpl.h"
#include "../../../VACoreConfig.h"
#include "../../../VALog.h"
#include <VAObjectPool.h>
#include <VAReferenceableObject.h>
......@@ -36,7 +36,7 @@
#include <ITAStopwatch.h>
#include <ITASampleFrame.h>
#include <ITAStreamInfo.h>
#include <FastMath.h>
#include <ITAFastMath.h>
// Vista includes
#include <VistaInterProcComm/Concurrency/VistaThreadEvent.h>
......@@ -284,7 +284,7 @@ CVAPTHearingAidRenderer::CVAPTHearingAidRenderer( const CVAAudioRendererInitPara
m_pUpdateMessagePool = IVAObjectPool::Create( 2, 1, new CVAPoolObjectDefaultFactory<UpdateMessage>, true);
ctxAudio.m_sbTemp.init( GetSamplerate(), GetBlocklength(), true );
ctxAudio.m_sbTemp.Init( GetBlocklength(), true );
ctxAudio.m_iResetFlag = 0; // Normal operation mode
ctxAudio.m_iStatus = 0; // Stopped
......@@ -883,8 +883,7 @@ CVAPTHearingAidRenderer::Listener* CVAPTHearingAidRenderer::CreateListener( cons
pListener->pData = m_pCore->GetSceneManager()->GetListenerDesc( iID );
pListener->pData->AddReference();
pListener->psfOutput = new ITASampleFrame( m_pCore->GetCoreConfig()->oAudioDriverConfig.dSamplerate,
m_pCore->GetCoreConfig()->oAudioDriverConfig.iOutputChannels, // TODO_LAS: get this value from hearing aid renderer config
pListener->psfOutput = new ITASampleFrame( m_pCore->GetCoreConfig()->oAudioDriverConfig.iOutputChannels, // TODO_LAS: get this value from hearing aid renderer config
m_pCore->GetCoreConfig()->oAudioDriverConfig.iBuffersize,
true );
assert( pListener->pData );
......@@ -1231,7 +1230,7 @@ CVAPTHASoundPath::CVAPTHASoundPath( double dSamplerate, int iBlocklength, int iH
pFIRConvolverChR1->releaseFilter( pHRIRFilterChR1 );
pFIRConvolverChR2->releaseFilter( pHRIRFilterChR2 );
m_sfHARIRTemp.init(dSamplerate, m_iMaxDaffChannelNumber, iHRIRFilterLength, false);
m_sfHARIRTemp.init( m_iMaxDaffChannelNumber, iHRIRFilterLength, false);
}
......@@ -1340,7 +1339,7 @@ void CVAPTHASoundPath::UpdateHARIR()
int iNewFilterLength = pHRIRData->GetProperties()->iFilterLength;
if( m_sfHARIRTemp.length() != iNewFilterLength )
{
m_sfHARIRTemp.init( m_sfHARIRTemp.getSamplerate(), m_iMaxDaffChannelNumber, iNewFilterLength, false );
m_sfHARIRTemp.init( m_iMaxDaffChannelNumber, iNewFilterLength, false );
}
if( iNewFilterLength > pFIRConvolverChL1->getMaxFilterlength() )
......
......@@ -27,22 +27,22 @@
#include "../../../VACoreBuildConfig.h"
#if (VACORE_RENDERER_PROTOTYPE_HEARING_AID==1)
#if ( VACORE_RENDERER_PROTOTYPE_HEARING_AID == 1 )
// VA includes
#include <Filtering/VAVariableDelayLine.h>
#include <Motion/VAMotionModelBase.h>
#include <Motion/VASharedMotionModel.h>
#include <Motion/VASampleAndHoldMotionModel.h>
#include <Rendering/VAAudioRenderer.h>
#include <Rendering/VAAudioRendererRegistry.h>
#include <Scene/VAScene.h>
#include "../../../Filtering/VAVariableDelayLine.h"
#include "../../../Motion/VAMotionModelBase.h"
#include "../../../Motion/VASharedMotionModel.h"
#include "../../../Motion/VASampleAndHoldMotionModel.h"
#include "../../VAAudioRenderer.h"
#include "../../VAAudioRendererRegistry.h"
#include "../../../Scene/VAScene.h"
#include <VABaseDefinitions.h>
#include <VACore.h>
#include <VACoreImpl.h>
#include "../../../VACoreImpl.h"
#include <VAObject.h>
#include <VAObjectPool.h>
#include <VASourceListenerMetrics.h>
#include "../../../VASourceListenerMetrics.h"
// ITA includes
#include <ITABufferedAudiofileWriter.h>
......
#include "VAVBAPFreefieldAudioRenderer.h"
#if (VACORE_RENDERER_VBAP_FREEFIELD==1)
#if ( VACORE_RENDERER_VBAP_FREEFIELD == 1 )
#include <Scene/VAScene.h>
#include <Utils/VAUtils.h>
#include <VAAudiostreamTracker.h>
#include <VACoreImpl.h>
#include <VACoreConfig.h>
#include <VAException.h>
#include <VALog.h>
#include "../../../Scene/VAScene.h"
#include "../../../Utils/VAUtils.h"
#include "../../../VAAudiostreamTracker.h"
#include "../../../VACoreImpl.h"
#include "../../../VACoreConfig.h"
#include "../../../VAException.h"
#include "../../../VALog.h"
#include <ITAConfigUtils.h>
#include <ITAConstants.h>
......@@ -16,7 +16,7 @@
#include <ITANumericUtils.h>
#include <ITAStreamPatchbay.h>
#include <ITAStreamInfo.h>
#include <FastMath.h>
#include <ITAFastMath.h>
#include <RG_Polygon.h>
#include <RG_Line.h>
......@@ -286,7 +286,7 @@ void CVAVBAPFreefieldAudioRenderer::HandleProcessStream( ITADatasourceRealizatio
// Synchronize internal lists of pathes
SyncInternalData();
ITASampleBuffer sbTemp;
sbTemp.init( m_pdsOutput->GetSamplerate(), m_pdsOutput->GetBlocklength(), true ); // cleared temp buffer
sbTemp.Init( m_pdsOutput->GetBlocklength(), true ); // cleared temp buffer
// Clear output buffer
for( unsigned int i=0; i<m_pdsOutput->GetNumberOfChannels(); i++ )
......@@ -379,7 +379,7 @@ void CVAVBAPFreefieldAudioRenderer::HandleProcessStream( ITADatasourceRealizatio
for( int k=0; k < iBlocklength; k++ )
{
double dcos = cos(k/iBlocklength*(PI_F/2));
double dcos = cos( k / iBlocklength*( ITAConstants::PI_F / 2 ) );
pfOutputData[k] += pfInputData[k] * float(( dcos * dcos * ( vdLoudspeakerLastGains[j] - vdLoudspeakerGains[j] ) + vdLoudspeakerGains[j] ));
}
......
......@@ -27,26 +27,27 @@
#include "../../../VACoreBuildConfig.h"
#if (VACORE_RENDERER_VBAP_FREEFIELD==1)
#if ( VACORE_RENDERER_VBAP_FREEFIELD == 1 )
// VA includes
#include <Filtering/VAVariableDelayLine.h>
#include <Motion/VASampleAndHoldMotionModel.h>
#include <Motion/VASharedMotionModel.h>
#include <Rendering/VAAudioRenderer.h>
#include <Rendering/VAAudioRendererRegistry.h>
#include <Scene/VAScene.h>
#include "../../../Filtering/VAVariableDelayLine.h"
#include "../../../Motion/VASampleAndHoldMotionModel.h"
#include "../../../Motion/VASharedMotionModel.h"
#include "../../../Rendering/VAAudioRenderer.h"
#include "../../../Rendering/VAAudioRendererRegistry.h"
#include "../../../Scene/VAScene.h"
#include <VABaseDefinitions.h>
#include <VACore.h>
#include <VAObjectPool.h>
#include <VASourceListenerMetrics.h>
#include <VAHardwareSetup.h>
#include "../../../VASourceListenerMetrics.h"
#include "../../../VAHardwareSetup.h"
// ITA includes
#include <ITADatasourceRealization.h>
#include <ITASampleBuffer.h>
#include <RG_Vector.h>
#include <RG_Polygon.h>
// Vista includes
#include <VistaBase/VistaVector3D.h>
// STL Includes
#include <list>
......@@ -109,7 +110,7 @@ private:
VAVec3 m_vReproSystemVirtualPosition; //!< Position der CAVE (oder des Reproduktionssystems) in der virtuellen Welt
VAOrientYPR m_oUserYPRRealWorldRAD; //!< Orientierung des Hoerers in der Cave (im Reproduktionssystem), Gieren, Nicken, Rollen
VAOrientYPR m_oUserYPRVirtualScene; //!< Orientierung des Hoerers in der virtuellen Umgebung, Gieren, Nicken, Rollen
RG_Vector m_vRotYaw, m_vRotPitch, m_vRotRoll; //!< Hilfsvektoren zum rotieren, um diese Achsen wird rotiert
VistaVector3D m_vRotYaw, m_vRotPitch, m_vRotRoll; //!< Hilfsvektoren zum rotieren, um diese Achsen wird rotiert
enum DIMENSIONS
{
......@@ -125,8 +126,8 @@ private:
std::string sIdentifier;
int iIdentifier;
int iChannel;
RG_Vector pos;
RG_Vector orient;
VistaVector3D pos;
VistaVector3D orient;
};
// Sections
......@@ -135,7 +136,7 @@ private:
public:
int iIdentifier;
std::vector <int> iLSIdentifier;
RG_Polygon Polygon;
VistaVector3D Polygon;
};
class SoundPath
......@@ -161,8 +162,8 @@ private:
bool m_bResetTrigger; //!< Bool die eins wird falls ein Reset stattfindet
int m_iCurGlobalAuralizationMode; //!< Der aktuelle Auralisierungsmodues, mit dem der Renderer arbeitet
RG_Vector m_vecCaveCenterPos; //!< Mittelpunkt der CAVE Umgebung relativ zu Szene
RG_Vector m_vecCaveCenterOrientYPR; //!< Mittelpunkt der CAVE Umgebung relativ zu Szene
VistaVector3D m_vecCaveCenterPos; //!< Mittelpunkt der CAVE Umgebung relativ zu Szene
VistaVector3D m_vecCaveCenterOrientYPR; //!< Mittelpunkt der CAVE Umgebung relativ zu Szene
int m_iSetupDimension; //!< Dimension of setup, see \DIMENSIONS
double m_dSpeedOfSound; //!< Speed of sound in medium, m/s
......
......@@ -44,7 +44,7 @@
#define VACORE_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE 1
#define VACORE_RENDERER_MONAURAL_FREEFIELD 1
#define VACORE_RENDERER_PROTOTYPE_DUMMY 1
#define VACORE_RENDERER_PROTOTYPE_HEARING_AID 0
#define VACORE_RENDERER_PROTOTYPE_HEARING_AID 1
#define VACORE_RENDERER_PROTOTYPE_GENERIC_PATH 1
#define VACORE_RENDERER_VBAP_FREEFIELD 0
......@@ -52,7 +52,7 @@
// --= Reproduction modules =-------------------------------------------
#define VACORE_REPRODUCTION_TALKTHROUGH 1
#define VACORE_REPRODUCTION_HEADPHONES 0
#define VACORE_REPRODUCTION_HEADPHONES 1
#define VACORE_REPRODUCTION_AMBISONICS 0
#define VACORE_REPRODUCTION_BINAURAL_NCTC 1
#define VACORE_REPRODUCTION_BINAURAL_MIXDOWN 0
......
Supports Markdown
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