Refactoring AirTrafficNoise renderer, also improving some problematic functions

parent e6799cf2
......@@ -16,6 +16,9 @@
#if VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE
#include "VAAirTrafficNoiseSoundReceiver.h"
#include "VAAirTrafficNoiseSoundSource.h"
// VA includes
#include <VA.h>
#include <VAObjectPool.h>
......@@ -57,7 +60,7 @@ class CVABATNSoundPathFactory;
* binaural receiver including multiple audio effects:
* - Directivity
* - Doppler-Shifts
* - Air-Absorption [TODO?!]
* - Air-Absorption
* - 1/r-Distance-Law
*
*/
......@@ -109,117 +112,6 @@ private:
const CVAAudioRendererInitParams m_oParams; //!< Create a const copy of the init params
//! Interne Beschreibung einer Schallquelle
class CVABATNSource : public CVAPoolObject
{
public:
class Config
{
public:
double dMotionModelWindowSize;
double dMotionModelWindowDelay;
int iMotionModelNumHistoryKeys;
};
inline CVABATNSource( const Config& oConf_ )
: oConf( oConf_ )
{};
const Config oConf;
CVASoundSourceDesc* pData; //!< (Unversioned) Source description
CVASharedMotionModel* pMotionModel;
bool bDeleted;
VAVec3 vPredPos; //!< Estimated position
VAVec3 vPredView; //!< Estimated Orientation (View-Vektor)
VAVec3 vPredUp; //!< Estimated Orientation (Up-Vektor)
bool bValidTrajectoryPresent; //!< Estimation possible -> valid trajectory present
// Pool-Konstruktor
inline void PreRequest()
{
pData = nullptr;
CVABasicMotionModel::Config oDefaultConfig;
oDefaultConfig.dWindowDelay = oConf.dMotionModelWindowDelay;
oDefaultConfig.dWindowSize = oConf.dMotionModelWindowSize;
oDefaultConfig.iNumHistoryKeys = oConf.iMotionModelNumHistoryKeys;
pMotionModel = new CVASharedMotionModel( new CVABasicMotionModel( oDefaultConfig ), true );
bValidTrajectoryPresent = false;
};
inline void PreRelease()
{
delete pMotionModel;
pMotionModel = nullptr;
};
inline double GetCreationTimestamp() const
{
return m_dCreationTimeStamp;
};
private:
double m_dCreationTimeStamp; //!< Date of creation within streaming context
};
//! Internal listener representation
class CVABATNSoundReceiver : public CVAPoolObject
{
public:
class Config
{
public:
double dMotionModelWindowSize;
double dMotionModelWindowDelay;
int iMotionModelNumHistoryKeys;
};
inline CVABATNSoundReceiver( CVACoreImpl* pCore, const Config& oConf )
: pCore( pCore ), oConf( oConf )
{};
CVACoreImpl* pCore;
const Config oConf;
CVAListenerDesc* pData; //!< (Unversioned) Listener description
CVASharedMotionModel* pMotionModel;
bool bDeleted;
VAVec3 vPredPos; //!< Estimated position
VAVec3 vPredView; //!< Estimated Orientation (View-Vektor)
VAVec3 vPredUp; //!< Estimated Orientation (Up-Vektor)
bool bValidTrajectoryPresent; //!< Estimation possible -> valid trajectory present
ITASampleFrame* psfOutput; //!< Accumulated listener output signals @todo check if sample frame is also deleted after usage
inline void PreRequest()
{
pData = nullptr;
CVABasicMotionModel::Config oListenerMotionConfig;
oListenerMotionConfig.dWindowDelay = oConf.dMotionModelWindowDelay;
oListenerMotionConfig.dWindowSize = oConf.dMotionModelWindowSize;
oListenerMotionConfig.iNumHistoryKeys = oConf.iMotionModelNumHistoryKeys;
pMotionModel = new CVASharedMotionModel( new CVABasicMotionModel( oListenerMotionConfig ), true );
bValidTrajectoryPresent = false;
psfOutput = nullptr;
};
// Pool-Destruktor
inline void PreRelease()
{
delete pMotionModel;
pMotionModel = nullptr;
};
};
private:
CVACoreImpl* m_pCore; //!< Pointer to VACore
CVASceneState* m_pCurSceneState;
......@@ -234,7 +126,7 @@ private:
IVAObjectPool* m_pSourcePool;
IVAObjectPool* m_pListenerPool;
std::map< int, CVABATNSource* > m_mSources; //!< Interne Abbildung der verfgbaren Quellen
std::map< int, CVABATNSoundSource* > m_mSources; //!< Interne Abbildung der verfgbaren Quellen
std::map< int, CVABATNSoundReceiver* > m_mListeners; //!< Interne Abbildung der verfgbaren Hrer
double m_dGroundPlanePosition; //!< Position of ground plane (height) for reflection calculation
......@@ -253,13 +145,13 @@ private:
bool m_bSpreadingLossExternalSimulation; //!< If true, internal simulation is skipped and parameters are expected to be set using external SetParameters() call
CVABATNSoundReceiver::Config m_oDefaultListenerConf; //!< Default listener config for factory object creation
CVABATNSource::Config m_oDefaultSourceConf; //!< Default source config for factory object creation
CVABATNSoundSource::Config m_oDefaultSourceConf; //!< Default source config for factory object creation
class CVABATNUpdateMessage : public CVAPoolObject
class CUpdateMessage : public CVAPoolObject
{
public:
std::list< CVABATNSource* > vNewSources;
std::list< CVABATNSource* > vDelSources;
std::list< CVABATNSoundSource* > vNewSources;
std::list< CVABATNSoundSource* > vDelSources;
std::list< CVABATNSoundReceiver* > vNewListeners;
std::list< CVABATNSoundReceiver* > vDelListeners;
std::list< CVABATNSoundPath* > vNewPaths;
......@@ -277,14 +169,14 @@ private:
};
IVAObjectPool* m_pUpdateMessagePool; // really necessary?
CVABATNUpdateMessage* m_pUpdateMessage;
CUpdateMessage* m_pUpdateMessage;
//! Data in context of audio process
struct
{
tbb::concurrent_queue< CVABATNUpdateMessage* > m_qpUpdateMessages; //!< Update messages list
tbb::concurrent_queue< CUpdateMessage* > m_qpUpdateMessages; //!< Update messages list
std::list< CVABATNSoundPath* > m_lSoundPaths; //!< List of sound paths
std::list< CVABATNSource* > m_lSources; //!< List of sources
std::list< CVABATNSoundSource* > m_lSources; //!< List of sources
std::list< CVABATNSoundReceiver* > m_lListener; //!< List of listeners
ITASampleBuffer m_sbTempBufD; //!< Temporally used buffer to store a block of samples during processing (direct sound)
ITASampleBuffer m_sbTempBufR; //!< Temporally used buffer to store a block of samples during processing (reflected sound)
......@@ -298,9 +190,9 @@ private:
void UpdateSources();
CVABATNSoundReceiver* CreateSoundReceiver( int iID, const CVAReceiverState* );
void DeleteListener( int iID );
CVABATNSource* CreateSoundSource( int iID, const CVASoundSourceState* );
CVABATNSoundSource* CreateSoundSource( int iID, const CVASoundSourceState* );
void DeleteSource( int iID );
CVABATNSoundPath* CreateSoundPath( CVABATNSource*, CVABATNSoundReceiver* );
CVABATNSoundPath* CreateSoundPath( CVABATNSoundSource*, CVABATNSoundReceiver* );
void DeleteSoundPath( CVABATNSoundPath* );
void UpdateTrajectories();
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2018
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VACORE_BINAURAL_AIR_TRAFFIC_SOUND_PATH
#define IW_VACORE_BINAURAL_AIR_TRAFFIC_SOUND_PATH
#include "VAAirTrafficNoiseSoundSource.h"
#include "VAAirTrafficNoiseSoundReceiver.h"
// VA includes
#include <VA.h>
#include <VAObjectPool.h>
#include "../../../Motion/VAMotionModelBase.h"
#include "../../../Motion/VASharedMotionModel.h"
#include "../../../Scene/VAScene.h"
#include "../../../VASourceListenerMetrics.h"
#include "../../../core/core.h"
#include "../../../Filtering/VATemporalVariations.h"
#include "../../../directivities/VADirectivityDAFFEnergetic.h"
#include "../../../directivities/VADirectivityDAFFHRIR.h"
// ITA includes
#include <ITADataSourceRealization.h>
#include <ITASampleBuffer.h>
#include <ITAVariableDelayLine.h>
#include <ITAThirdOctaveMagnitudeSpectrum.h>
#include <ITAUPConvolution.h>
#include <ITAUPFilter.h>
#include <ITAUPFilterPool.h>
#include <ITAThirdOctaveFilterbank.h>
// 3rdParty includes
#include <tbb/concurrent_queue.h>
// STL Includes
class CVABATNSoundPath : public CVAPoolObject
{
public:
virtual ~CVABATNSoundPath();
//! Retarded metrics of sound path
class Metrics
{
public:
double dRetardedDistance; //!< Metrical distance to retarded sound position
VAQuat qAngleRetSourceToListener; //!< Immediate angle of incidence to retarded source position in listener reference frame in YPR convention
VAQuat qAngleListenerToRetSource; //!< Retarded angle of incidence to listener in source reference frame in YPR convention
};
//! State of directivity
class CSoundSourceDirectivityState
{
public:
inline CSoundSourceDirectivityState()
: pData( NULL )
, iRecord( -1 )
, bDirectivityEnabled( true ) {};
IVADirectivity* pData; //!< Directivity data, may be NULL
int iRecord; //!< Directivity index
bool bDirectivityEnabled;
inline bool operator==( const CSoundSourceDirectivityState& rhs ) const
{
bool bBothEnabled = ( bDirectivityEnabled == rhs.bDirectivityEnabled );
bool bSameRecordIndex = ( iRecord == rhs.iRecord );
bool bSameData = ( pData == rhs.pData );
return ( bBothEnabled && bSameRecordIndex && bSameData );
};
};
class CSoundReceiverDirectivityState
{
public:
inline CSoundReceiverDirectivityState()
: pData( NULL )
, iRecord( -1 )
, fDistance( 1.0f ) {};
IVADirectivity* pData; //!< HRIR data, may be NULL
int iRecord; //!< HRIR index
float fDistance; //!< HRIR dataset distance
inline bool operator!=( const CSoundReceiverDirectivityState& rhs ) const
{
if( pData != rhs.pData ) return true;
if( fDistance != rhs.fDistance ) return true;
if( iRecord != rhs.iRecord ) return true;
return false;
};
};
CVABATNSoundSource* pSoundSource; //!< Verknpfte Quelle
CVABATNSoundReceiver* pSoundReceiver; //!< Verknpfter Hrer
struct CPropPath
{
CVASourceReceiverMetrics oRelations; //!< Informationen ber die Relation von Quelle und Hrer (Position & Orientierung)
double dPropagationTime; //!< Time that the sound waves took to be propagated to the receiver
double dGeometricalSpreadingLoss; //!< Spherical / geometrical spreading loss (usually 1-by-R distance law)
CITAVariableDelayLine* pVariableDelayLine; //!< DSP-Element zur Bercksichtigung der Mediumsausbreitung in instationren Schallfeldern (inkl. Doppler-Effekt, falls aktiviert)
CSoundSourceDirectivityState oDirectivityStateCur; //!< Aktueller Status der Richtcharakteristik
CSoundSourceDirectivityState oDirectivityStateNew; //!< Neuer Status der Richtcharakteristik
ITABase::CThirdOctaveGainMagnitudeSpectrum oSoundSourceDirectivityMagnitudes; //!< Magnitudes for directivity
CVAAtmosphericTemporalVariantions oATVGenerator; //!< Generator for temporal variation magnitudes of the time signal by medium shifts during propagation
ITABase::CThirdOctaveGainMagnitudeSpectrum oTemporalVariationMagnitudes; //!< Magnitudes for temporal variation of the time signal by medium shifts during propagation
ITABase::CThirdOctaveGainMagnitudeSpectrum oAirAttenuationMagnitudes; //!< Magnitudes for air attenuation (damping)
ITABase::CThirdOctaveGainMagnitudeSpectrum oGroundReflectionMagnitudes; //!< Ground reflection parameters (only for reflection paths)
CITAThirdOctaveFilterbank* pThirdOctaveFilterBank; //!< DSP-Element zur Filterung von Third-Octave Datenstzen der Richtcharakteristik
ITABase::CThirdOctaveGainMagnitudeSpectrum oThirdOctaveFilterMagnitudes; //!< DSP magnitudes (third octave band resolution)
CSoundReceiverDirectivityState oSoundReceiverDirectivityStateCur; //!< Aktueller Status der HRIR
CSoundReceiverDirectivityState oSoundReceiverDirectivityStateNew; //!< Neuer Status der HRIR
ITAUPConvolution* pFIRConvolverChL; //!< DSP-Element zur Faltung mit der Kopfbezogenen bertragungsfunktion im Zeitbereich (HRIR) - Links
ITAUPConvolution* pFIRConvolverChR; //!< DSP-Element zur Faltung mit der Kopfbezogenen bertragungsfunktion im Zeitbereich (HRIR) - Rechts
inline CPropPath()
: dPropagationTime( 0.0f )
, dGeometricalSpreadingLoss( 1.0f )
, pVariableDelayLine( NULL )
, pThirdOctaveFilterBank( NULL )
, pFIRConvolverChL( NULL )
, pFIRConvolverChR( NULL )
{
oGroundReflectionMagnitudes.SetIdentity();
};
};
CPropPath oDirSoundPath; //!< Direct sound propagation path
CPropPath oRefSoundPath; //!< Propagation path including ground reflection
double dGroundReflectionPlanePosition; //!< Height of ground, defaults to 0
std::atomic< bool > bDelete; //!< Schallpfad zur Lschung markiert?
inline void PreRequest()
{
pSoundSource = nullptr;
pSoundReceiver = nullptr;
// Reset DSP elements
oDirSoundPath.pThirdOctaveFilterBank->Clear();
oRefSoundPath.pThirdOctaveFilterBank->Clear();
oDirSoundPath.pVariableDelayLine->Clear();
oRefSoundPath.pVariableDelayLine->Clear();
oDirSoundPath.pFIRConvolverChL->clear();
oRefSoundPath.pFIRConvolverChL->clear();
oDirSoundPath.pFIRConvolverChR->clear();
oRefSoundPath.pFIRConvolverChR->clear();
};
//! Bestimmt die relativen Gren des Pfades
/**
* Diese berechneten Gren dienen als Grundlage zur Bestimmung der ausgewhlten
* Datenstze und Einstellungen der DSP-Elemente. Ein weiteres Update der einzelnen
* DSP-Elemente fhrt z.B. zum Filteraustausch, wenn die Statusnderung Auswirkungen hat
* (tatschlich ein neuer Datensatz geholt werden muss).
*
* Diese Methode ist besonders leichtgewichtig, da sie im StreamProcess genutzt wird.
*
* // spter -> \return Gibt false zurck, falls die retardierten Werte noch nicht zur Verfgung stehen.
*/
void UpdateMetrics();
//! Aktualisiert die einzelnen Komponenten des Schallpfades
void UpdateEntities( int iEffectiveAuralisationMode );
//! Aktualisiert die Richtcharakteristik auf dem Pfad
void UpdateSoundSourceDirectivity();
//! Aktualisiert die Mediumsausbreitung auf dem Pfad
void UpdateMediumPropagation( double dSpeedOfSound );
//! Updates the temporal variations model of medium shift fluctuation
void UpdateTemporalVariation();
//! Updates the air attenuation (damping)
void UpdateAirAttenuation( const double dTemperatur = 20.0f, const double dPressure = 101.325e3, const double dHumidity = 60.0f );
//! Aktualisiert den Lautstrkeabfall nach dem 1/r-Gesetzt (Inverse Distance Decrease/Law)
void CalculateInverseDistanceDecrease();
//! Aktualisiert die HRIR auf dem Pfad
void UpdateSoundReceiverDirectivity();
//! Aktiviert/Deaktiviert Doppler-Verschiebung
void SetDopplerShiftsEnabled( bool bEnabled );
private:
//! Standard-Konstruktor deaktivieren
CVABATNSoundPath();
//! Konstruktor
CVABATNSoundPath( double dSamplerate, int iBlocklength, int iHRIRFilterLength, int iDirFilterLength, int iFilterBankType = CITAThirdOctaveFilterbank::IIR_BIQUADS_ORDER10 );
ITASampleFrame m_sfHRIRTemp; //!< Intern verwendeter Zwischenspeicher fr HRIR Datentze
int m_iDefaultVDLSwitchingAlgorithm; //!< Umsetzung der Verzgerungsnderung
friend class CVABATNSoundPathFactory;
};
// Factory
class CVABATNSoundPathFactory : public IVAPoolObjectFactory
{
public:
inline CVABATNSoundPathFactory( double dSamplerate, int iBlocklength, int iHRIRFilterLength, int iDirFilterLength, int iFilterBankType = CITAThirdOctaveFilterbank::IIR_BIQUADS_ORDER10 )
: m_dSamplerate( dSamplerate )
, m_iBlocklength( iBlocklength )
, m_iHRIRFilterLength( iHRIRFilterLength )
, m_iDirFilterLength( iDirFilterLength )
, m_iFilterBankType( iFilterBankType )
{};
inline CVAPoolObject* CreatePoolObject()
{
return new CVABATNSoundPath( m_dSamplerate, m_iBlocklength, m_iHRIRFilterLength, m_iDirFilterLength, m_iFilterBankType );
};
private:
double m_dSamplerate; //!< Abtastrate
int m_iBlocklength; //!< Blocklnge
int m_iHRIRFilterLength; //!< Filterlnge der HRIR
int m_iDirFilterLength; //!< Filterlnge der Richtcharakteristik
int m_iFilterBankType; //!< Filter bank type (FIR, IIR)
};
#endif // IW_VACORE_BINAURAL_AIR_TRAFFIC_SOUND_PATH
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2018
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VACORE_BINAURAL_AIR_TRAFFIC_SOUND_RECEIVER
#define IW_VACORE_BINAURAL_AIR_TRAFFIC_SOUND_RECEIVER
// VA includes
#include <VA.h>
#include <VAObjectPool.h>
#include "../../../Motion/VAMotionModelBase.h"
#include "../../../Motion/VASharedMotionModel.h"
#include "../../../Scene/VAScene.h"
#include "../../../VASourceListenerMetrics.h"
#include "../../../core/core.h"
#include "../../../Filtering/VATemporalVariations.h"
// ITA includes
#include <ITADataSourceRealization.h>
#include <ITASampleBuffer.h>
#include <ITAVariableDelayLine.h>
#include <ITAThirdOctaveMagnitudeSpectrum.h>
#include <ITAUPConvolution.h>
#include <ITAUPFilter.h>
#include <ITAUPFilterPool.h>
#include <ITAThirdOctaveFilterbank.h>
//! Internal receiver representation
class CVABATNSoundReceiver : public CVAPoolObject
{
public:
class Config
{
public:
double dMotionModelWindowSize;
double dMotionModelWindowDelay;
int iMotionModelNumHistoryKeys;
};
inline CVABATNSoundReceiver( CVACoreImpl* pCore, const Config& oConf )
: pCore( pCore ), oConf( oConf )
{};
CVACoreImpl* pCore;
const Config oConf;
CVAListenerDesc* pData; //!< (Unversioned) Listener description
CVASharedMotionModel* pMotionModel;
bool bDeleted;
VAVec3 vPredPos; //!< Estimated position
VAVec3 vPredView; //!< Estimated Orientation (View-Vektor)
VAVec3 vPredUp; //!< Estimated Orientation (Up-Vektor)
bool bValidTrajectoryPresent; //!< Estimation possible -> valid trajectory present
ITASampleFrame* psfOutput; //!< Accumulated listener output signals @todo check if sample frame is also deleted after usage
inline void PreRequest()
{
pData = nullptr;
CVABasicMotionModel::Config oListenerMotionConfig;
oListenerMotionConfig.dWindowDelay = oConf.dMotionModelWindowDelay;
oListenerMotionConfig.dWindowSize = oConf.dMotionModelWindowSize;
oListenerMotionConfig.iNumHistoryKeys = oConf.iMotionModelNumHistoryKeys;
pMotionModel = new CVASharedMotionModel( new CVABasicMotionModel( oListenerMotionConfig ), true );
bValidTrajectoryPresent = false;
psfOutput = nullptr;
};
// Pool-Destruktor
inline void PreRelease()
{
delete pMotionModel;
pMotionModel = nullptr;
};
};
class CVABATNSoundReceiverPoolFactory : public IVAPoolObjectFactory
{
public:
inline CVABATNSoundReceiverPoolFactory( CVACoreImpl* pCore, const CVABATNSoundReceiver::Config& oConf )
: m_pCore( pCore ), m_oListenerConf( oConf )
{
};
inline CVAPoolObject* CreatePoolObject()
{
CVABATNSoundReceiver * pListener;
pListener = new CVABATNSoundReceiver( m_pCore, m_oListenerConf );
return pListener;
};
private:
CVACoreImpl* m_pCore;
const CVABATNSoundReceiver::Config& m_oListenerConf;
//! Not for use, avoid C4512
inline CVABATNSoundReceiverPoolFactory operator=( const CVABATNSoundReceiverPoolFactory & ) { VA_EXCEPT_NOT_IMPLEMENTED; };
};
#endif // IW_VACORE_BINAURAL_AIR_TRAFFIC_SOUND_RECEIVER
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2018
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VACORE_BINAURAL_AIR_TRAFFIC_SOUND_SOURCE
#define IW_VACORE_BINAURAL_AIR_TRAFFIC_SOUND_SOURCE
// VA includes
#include <VA.h>
#include <VAObjectPool.h>
#include "../../../Motion/VAMotionModelBase.h"
#include "../../../Motion/VASharedMotionModel.h"
#include "../../../Scene/VAScene.h"
#include "../../../VASourceListenerMetrics.h"
#include "../../../core/core.h"
#include "../../../Filtering/VATemporalVariations.h"
// ITA includes
#include <ITADataSourceRealization.h>
#include <ITASampleBuffer.h>
#include <ITAVariableDelayLine.h>
#include <ITAThirdOctaveMagnitudeSpectrum.h>
#include <ITAUPConvolution.h>
#include <ITAUPFilter.h>
#include <ITAUPFilterPool.h>
#include <ITAThirdOctaveFilterbank.h>
//! Interne Beschreibung einer Schallquelle
class CVABATNSoundSource : public CVAPoolObject
{
public:
class Config
{
public:
double dMotionModelWindowSize;
double dMotionModelWindowDelay;
int iMotionModelNumHistoryKeys;
};
inline CVABATNSoundSource( const Config& oConf_ )
: oConf( oConf_ )
{};
const Config oConf;
CVASoundSourceDesc* pData; //!< (Unversioned) Source description
CVASharedMotionModel* pMotionModel;
bool bDeleted;
VAVec3 vPredPos; //!< Estimated position
VAVec3 vPredView; //!< Estimated Orientation (View-Vektor)
VAVec3 vPredUp; //!< Estimated Orientation (Up-Vektor)
bool bValidTrajectoryPresent; //!< Estimation possible -> valid trajectory present
// Pool-Konstruktor
inline void PreRequest()
{
pData = nullptr;
CVABasicMotionModel::Config oDefaultConfig;
oDefaultConfig.dWindowDelay = oConf.dMotionModelWindowDelay;
oDefaultConfig.dWindowSize = oConf.dMotionModelWindowSize;
oDefaultConfig.iNumHistoryKeys = oConf.iMotionModelNumHistoryKeys;
pMotionModel = new CVASharedMotionModel( new CVABasicMotionModel( oDefaultConfig ), true );
bValidTrajectoryPresent = false;
};
inline void PreRelease()
{
delete pMotionModel;
pMotionModel = nullptr;
};
inline double GetCreationTimestamp() const
{
return m_dCreationTimeStamp;
};
private:
double m_dCreationTimeStamp; //!< Date of creation within streaming context
};
class CVABATNSourcePoolFactory : public IVAPoolObjectFactory
{
public:
inline CVABATNSourcePoolFactory( const CVABATNSoundSource::Config& oConf )
: m_oSourceConf( oConf )
{
};
inline CVAPoolObject* CreatePoolObject()
{
CVABATNSoundSource * pSource;
pSource = new CVABATNSoundSource( m_oSourceConf );
return pSource;
};
private:
const CVABATNSoundSource::Config& m_oSourceConf;
//! Not for use, avoid C4512
inline CVABATNSourcePoolFactory operator=( const CVABATNSourcePoolFactory & ) { VA_EXCEPT_NOT_IMPLEMENTED; };
};
#endif // IW_VACORE_BINAURAL_AIR_TRAFFIC_SOUND_SOURCE
......@@ -6,6 +6,12 @@ set( RelativeSourceGroup "src\\Rendering\\Binaural\\AirTrafficNoise" )
set( DirFiles
VAAirTrafficNoiseAudioRenderer.cpp
VAAirTrafficNoiseAudioRenderer.h
VAAirTrafficNoiseSoundPath.cpp
VAAirTrafficNoiseSoundPath.h
VAAirTrafficNoiseSoundReceiver.h
#VAAirTrafficNoiseSoundReceiver.cpp
VAAirTrafficNoiseSoundSource.h
#VAAirTrafficNoiseSoundSource.cpp
_SourceFiles.cmake
)
set( DirFiles_SourceGroup "${RelativeSourceGroup}" )
......
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