Commit 200f97d2 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Merge branch 'big_2017_api_change' of https://git.rwth-aachen.de/ita/VACore...

Merge branch 'big_2017_api_change' of https://git.rwth-aachen.de/ita/VACore into big_2017_api_change
parents c8efffa6 12ce4405
......@@ -144,8 +144,8 @@ 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( )
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_MONAURAL_FREE_FIELD )
set( ITA_VACORE_WITH_RENDERER_MONAURAL_FREE_FIELD ON CACHE BOOL "Build VACore with rendering module: monaural free-field" )
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_PROTOTYPE_FREE_FIELD )
set( ITA_VACORE_WITH_RENDERER_PROTOTYPE_FREE_FIELD ON CACHE BOOL "Build VACore with rendering module: prototype free-field" )
endif( )
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_PROTOTYPE_DUMMY )
......@@ -224,14 +224,14 @@ 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" )
if( ITA_VACORE_MODULE_INTERFACE_ENABLED )
add_definitions( "-DVACORE_MODULE_INTERFACE_ENABLED" )
endif( )
if( ${ITA_VACORE_NO_MODULE_INTERFACE_THROW_EXCEPTION} )
add_definitions( "-DVACORE_NO_MODULE_INTERFACE_THROW_EXCEPTION=1" )
if( ITA_VACORE_NO_MODULE_INTERFACE_THROW_EXCEPTION )
add_definitions( "-DVACORE_NO_MODULE_INTERFACE_THROW_EXCEPTION" )
endif( )
if( ${ITA_VACORE_EVENTS_ENABLED} )
add_definitions( "-DVACORE_EVENTS_ENABLED=1" )
if( ITA_VACORE_EVENTS_ENABLED )
add_definitions( "-DVACORE_EVENTS_ENABLED" )
endif( )
add_definitions( "-DVACORE_DEFAULT_CONFIGFILE=\"${ITA_VACORE_DEFAULT_CONFIG_FILE_NAME}\"" )
......@@ -249,66 +249,66 @@ if( ITA_VACORE_WITH_AUDIO_BACKEND_DUMMY )
endif( )
# Rendering definitions
if( ${ITA_VACORE_WITH_RENDERER_AMBIENT_MIXER} )
add_definitions( "-DVACORE_WITH_RENDERER_AMBIENT_MIXER=1" )
if( ITA_VACORE_WITH_RENDERER_AMBIENT_MIXER )
add_definitions( "-DVACORE_WITH_RENDERER_AMBIENT_MIXER" )
endif( )
if( ${ITA_VACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD} )
add_definitions( "-DVACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD=1" )
if( ITA_VACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD )
add_definitions( "-DVACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD" )
endif( )
if( ${ITA_VACORE_WITH_RENDERER_BINAURAL_FREE_FIELD} )
add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_FREE_FIELD=1" )
if( ITA_VACORE_WITH_RENDERER_BINAURAL_FREE_FIELD )
add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_FREE_FIELD" )
endif( )
if( ${ITA_VACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB} )
add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB=1" )
if( ITA_VACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB )
add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB" )
endif( )
if( ${ITA_VACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS} )
if( ITA_VACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS )
if( RAVENNET_FOUND )
vista_use_package( RavenNet REQUIRED FIND_DEPENDENCIES )
add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS=1" )
else( RAVENNET_FOUND )
add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS" )
else( )
message( "Could not find RavenNet, which is required by binaural room acoustics audio renderer" )
endif( RAVENNET_FOUND )
endif( )
endif( )
if( ${ITA_VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE} )
if( ITA_VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE )
add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE" )
endif( )
if( ${ITA_VACORE_WITH_RENDERER_MONAURAL_FREE_FIELD} )
add_definitions( "-DVACORE_WITH_RENDERER_MONAURAL_FREE_FIELD=1" )
if( ITA_VACORE_WITH_RENDERER_PROTOTYPE_FREE_FIELD )
add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_FREE_FIELD" )
endif( )
if( ${ITA_VACORE_WITH_RENDERER_PROTOTYPE_DUMMY} )
add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_DUMMY=1" )
if( ITA_VACORE_WITH_RENDERER_PROTOTYPE_DUMMY )
add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_DUMMY" )
endif( )
if( ${ITA_VACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID} )
add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID=1" )
if( ITA_VACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID )
add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID" )
endif( )
if( ${ITA_VACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH} )
add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH=1" )
if( ITA_VACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH )
add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH" )
endif( )
if( ${ITA_VACORE_WITH_RENDERER_VBAP_FREE_FIELD} )
add_definitions( "-DVACORE_WITH_RENDERER_VBAP_FREE_FIELD=1" )
if( ITA_VACORE_WITH_RENDERER_VBAP_FREE_FIELD )
add_definitions( "-DVACORE_WITH_RENDERER_VBAP_FREE_FIELD" )
endif( )
# Reproduction definitions
if( ${ITA_VACORE_WITH_REPRODUCTION_TALKTHROUGH} )
add_definitions( "-DVACORE_WITH_REPRODUCTION_TALKTHROUGH=1" )
if( ITA_VACORE_WITH_REPRODUCTION_TALKTHROUGH )
add_definitions( "-DVACORE_WITH_REPRODUCTION_TALKTHROUGH" )
endif( )
if( ${ITA_VACORE_WITH_REPRODUCTION_HEADPHONES} )
add_definitions( "-DVACORE_WITH_REPRODUCTION_HEADPHONES=1" )
if( ITA_VACORE_WITH_REPRODUCTION_HEADPHONES )
add_definitions( "-DVACORE_WITH_REPRODUCTION_HEADPHONES" )
endif( )
if( ${ITA_VACORE_WITH_REPRODUCTION_AMBISONICS} )
add_definitions( "-DVACORE_WITH_REPRODUCTION_AMBISONICS=1" )
if( ITA_VACORE_WITH_REPRODUCTION_AMBISONICS )
add_definitions( "-DVACORE_WITH_REPRODUCTION_AMBISONICS" )
endif( )
if( ${ITA_VACORE_WITH_REPRODUCTION_BINAURAL_NCTC} )
add_definitions( "-DVACORE_WITH_REPRODUCTION_BINAURAL_NCTC=1" )
if( ITA_VACORE_WITH_REPRODUCTION_BINAURAL_NCTC )
add_definitions( "-DVACORE_WITH_REPRODUCTION_BINAURAL_NCTC" )
endif( )
if( ${ITA_VACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN} )
add_definitions( "-DVACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN=1" )
if( ITA_VACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN )
add_definitions( "-DVACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN" )
endif( )
if( ${ITA_VACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN} )
add_definitions( "-DVACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN=1" )
if( ITA_VACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN )
add_definitions( "-DVACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN" )
endif( )
if( ${ITA_VACORE_WITH_REPRODUCTION_MIXER_LOW_FREQUENCY} )
add_definitions( "-DVACORE_WITH_REPRODUCTION_MIXER_LOW_FREQUENCY=1" )
if( ITA_VACORE_WITH_REPRODUCTION_MIXER_LOW_FREQUENCY )
add_definitions( "-DVACORE_WITH_REPRODUCTION_MIXER_LOW_FREQUENCY" )
endif( )
string( TIMESTAMP VACORE_CMAKE_DATE "%Y-%m-%d" )
......
......@@ -172,7 +172,7 @@ protected:
private:
const Config m_oConf;
CVABasicMotionModel & operator=( const CVABasicMotionModel & ) { VA_EXCEPT_NOT_IMPLEMENTED; };
inline CVABasicMotionModel & operator=( const CVABasicMotionModel & ) { VA_EXCEPT_NOT_IMPLEMENTED; };
};
#endif // IW_VACORE_MOTIONMODELBASE
......@@ -15,7 +15,8 @@
#include "../Scene/VAMotionState.h"
#if (VA_MOTIONMODEL_DATA_LOG_ESTIMATED == 1)
#ifdef VA_MOTIONMODEL_DATA_LOG_ESTIMATED
std::ostream& CVASampleAndHoldMotionModel::MotionLogDataOutput::outputDesc(std::ostream& os) const
{
os << "Estimation time" << "\t"
......@@ -31,9 +32,10 @@ std::ostream& CVASampleAndHoldMotionModel::MotionLogDataOutput::outputData(std::
os << dTime << "\t" << vPos.x << "\t" << vPos.y << "\t" << vPos.z << std::endl;
return os;
}
#endif
#if (VA_MOTIONMODEL_DATA_LOG_INPUT== 1)
#ifdef VA_MOTIONMODEL_DATA_LOG_INPUT
std::ostream& CVASampleAndHoldMotionModel::MotionLogDataInput::outputDesc(std::ostream& os) const
{
os << "Input time" << "\t"
......
......@@ -28,10 +28,10 @@ public:
, m_dStartTime( 0 )
{
char buf1[ 255 ];
sprintf( buf1, "SampleAndHoldMotionModel_Estimation_0x%08Xh.log", this );
sprintf( buf1, "SampleAndHoldMotionModel_Estimation_0x%08Xh.log", int( this ) );
m_oEstimationDataLog.setOutputFile( buf1 );
char buf2[ 255 ];
sprintf( buf2, "SampleAndHoldMotionModel_Input_0x%08Xh.log", this );
sprintf( buf2, "SampleAndHoldMotionModel_Input_0x%08Xh.log", int( this ) );
m_oInputDataLog.setOutputFile( buf2 );
};
......
......@@ -29,7 +29,7 @@
#include <assert.h>
#include <string>
#if( VACORE_WITH_RENDERER_AMBIENT_MIXER == 1 )
#ifdef VACORE_WITH_RENDERER_AMBIENT_MIXER
CVAAmbientMixerAudioRenderer::CVAAmbientMixerAudioRenderer( const CVAAudioRendererInitParams& oParams_ )
: m_oParams( oParams_ )
......
......@@ -14,7 +14,7 @@
#ifndef IW_VACORE_AMBIENT_MIXER_AUDIO_RENDERER
#define IW_VACORE_AMBIENT_MIXER_AUDIO_RENDERER
#if( VACORE_WITH_RENDERER_AMBIENT_MIXER == 1 )
#ifdef VACORE_WITH_RENDERER_AMBIENT_MIXER
// VA includes
#include "../../VAAudioRenderer.h"
......@@ -52,9 +52,9 @@ private:
CVASceneState* m_pNewSceneState;
CVASceneState* m_pCurSceneState;
ITAAtomicBool m_bIndicateReset, m_bResetAck;
CVAAmbientMixerAudioRenderer operator=( const CVAAmbientMixerAudioRenderer & ) { VA_EXCEPT_NOT_IMPLEMENTED; };
inline CVAAmbientMixerAudioRenderer operator=( const CVAAmbientMixerAudioRenderer & ) { VA_EXCEPT_NOT_IMPLEMENTED; };
};
#endif // ( VACORE_WITH_RENDERER_AMBIENT_MIXER == 1 )
#endif // VACORE_WITH_RENDERER_AMBIENT_MIXER
#endif // IW_VACORE_AMBIENT_MIXER_AUDIO_RENDERER
......@@ -13,7 +13,7 @@
#include "VAAmbisonicsFreefieldAudioRenderer.h"
#if ( VACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD == 1 )
#ifdef VACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD
// VA includes
#include "../../../directivities/VADirectivity.h"
......@@ -125,7 +125,7 @@ public:
CVAAmbisonicsFreeFieldAudioRenderer::CVAAFFSource* pSource;
CVAAmbisonicsFreeFieldAudioRenderer::CVAAFFListener* pListener;
CVASourceListenerMetrics oRelations; //!< Informationen on source and receiver relations (distances & angles)
CVASourceReceiverMetrics oRelations; //!< Informationen on source and receiver relations (distances & angles)
CDirectivityState oDirectivityStateCur;
CDirectivityState oDirectivityStateNew;
......@@ -216,6 +216,9 @@ public:
private:
CVACoreImpl* m_pCore;
const CVAAmbisonicsFreeFieldAudioRenderer::CVAAFFListener::Config& m_oListenerConf;
//! Not for use, avoid C4512
CVAAFFListenerPoolFactory operator=( const CVAAFFListenerPoolFactory & ) { VA_EXCEPT_NOT_IMPLEMENTED; }
};
class CVAAFFSourcePoolFactory : public IVAPoolObjectFactory
......@@ -234,6 +237,9 @@ public:
private:
const CVAAmbisonicsFreeFieldAudioRenderer::CVAAFFSource::Config& m_oSourceConf;
//! Not for use, avoid C4512
CVAAFFSourcePoolFactory operator=( const CVAAFFSourcePoolFactory & ) { VA_EXCEPT_NOT_IMPLEMENTED; }
};
// Renderer
......@@ -491,8 +497,8 @@ void CVAAmbisonicsFreeFieldAudioRenderer::ManageSoundPaths( const CVASceneState*
if( bDeletetionRequired == false )
{
// Receiver deleted?
std::vector< int >::const_iterator citr = pDiff->viDelListenerIDs.begin();
while( citr != pDiff->viDelListenerIDs.end() )
std::vector< int >::const_iterator citr = pDiff->viDelReceiverIDs.begin();
while( citr != pDiff->viDelReceiverIDs.end() )
{
const int& iIDListenerDeleted( *citr++ );
if( iListenerID == iIDListenerDeleted )
......@@ -523,8 +529,8 @@ void CVAAmbisonicsFreeFieldAudioRenderer::ManageSoundPaths( const CVASceneState*
}
// Deleted receivers
std::vector< int >::const_iterator citr = pDiff->viDelListenerIDs.begin();
while( citr != pDiff->viDelListenerIDs.end() )
std::vector< int >::const_iterator citr = pDiff->viDelReceiverIDs.begin();
while( citr != pDiff->viDelReceiverIDs.end() )
{
const int& iID( *citr++ );
DeleteListener( iID );
......@@ -543,16 +549,16 @@ void CVAAmbisonicsFreeFieldAudioRenderer::ManageSoundPaths( const CVASceneState*
}
// New receivers
citr = pDiff->viNewListenerIDs.begin();
while( citr != pDiff->viNewListenerIDs.end() )
citr = pDiff->viNewReceiverIDs.begin();
while( citr != pDiff->viNewReceiverIDs.end() )
{
const int& iID( *citr++ );
CVAAFFListener* pListener = CreateListener( iID, pNewScene->GetListenerState( iID ) );
CVAAFFListener* pListener = CreateListener( iID, pNewScene->GetReceiverState( iID ) );
}
// New paths: (1) new receivers, current sources
citr = pDiff->viNewListenerIDs.begin();
while( citr != pDiff->viNewListenerIDs.end() )
citr = pDiff->viNewReceiverIDs.begin();
while( citr != pDiff->viNewReceiverIDs.end() )
{
int iListenerID = ( *citr++ );
CVAAFFListener* pListener = m_mListeners[ iListenerID ];
......@@ -584,9 +590,9 @@ void CVAAmbisonicsFreeFieldAudioRenderer::ManageSoundPaths( const CVASceneState*
continue; // Explicit source is not connected to this renderer
CVAAFFSource* pSource = it->second;
for( size_t i = 0; i < pDiff->viComListenerIDs.size(); i++ )
for( size_t i = 0; i < pDiff->viComReceiverIDs.size(); i++ )
{
int iListenerID = pDiff->viComListenerIDs[ i ];
int iListenerID = pDiff->viComReceiverIDs[ i ];
CVAAFFListener* pListener = m_mListeners[ iListenerID ];
if( !pListener->bDeleted )
CVAAFFSoundPath* pPath = CreateSoundPath( pSource, pListener );
......@@ -606,8 +612,8 @@ void CVAAmbisonicsFreeFieldAudioRenderer::ManageSoundPaths( const CVASceneState*
CVAAFFSource* pSource = it->second;
assert( pSource );
citr = pDiff->viNewListenerIDs.begin();
while( citr != pDiff->viNewListenerIDs.end() )
citr = pDiff->viNewReceiverIDs.begin();
while( citr != pDiff->viNewReceiverIDs.end() )
{
const int& iListenerID( *citr++ );
CVAAFFListener* pListener = m_mListeners[ iListenerID ];
......@@ -672,7 +678,7 @@ void CVAAmbisonicsFreeFieldAudioRenderer::HandleProcessStream( ITADatasourceReal
while( spit != ctxAudio.m_lSoundPaths.end() )
{
CVAAFFSoundPath* pPath( *spit );
CVAListenerState* pListenerState = ( m_pCurSceneState ? m_pCurSceneState->GetListenerState( pPath->pListener->pData->iID ) : NULL );
CVAReceiverState* pListenerState = ( m_pCurSceneState ? m_pCurSceneState->GetReceiverState( pPath->pListener->pData->iID ) : NULL );
CVASoundSourceState* pSourceState = ( m_pCurSceneState ? m_pCurSceneState->GetSoundSourceState( pPath->pSource->pData->iID ) : NULL );
if( pListenerState == nullptr || pSourceState == nullptr )
......@@ -812,8 +818,8 @@ void CVAAmbisonicsFreeFieldAudioRenderer::UpdateTrajectories()
int iListenerID = it->first;
CVAAFFListener* pListener = it->second;
CVAListenerState* pListenerCur = ( m_pCurSceneState ? m_pCurSceneState->GetListenerState( iListenerID ) : nullptr );
CVAListenerState* pListenerNew = ( m_pNewSceneState ? m_pNewSceneState->GetListenerState( iListenerID ) : nullptr );
CVAReceiverState* pListenerCur = ( m_pCurSceneState ? m_pCurSceneState->GetReceiverState( iListenerID ) : nullptr );
CVAReceiverState* pListenerNew = ( m_pNewSceneState ? m_pNewSceneState->GetReceiverState( iListenerID ) : nullptr );
const CVAMotionState* pMotionCur = ( pListenerCur ? pListenerCur->GetMotionState() : nullptr );
const CVAMotionState* pMotionNew = ( pListenerNew ? pListenerNew->GetMotionState() : nullptr );
......@@ -871,7 +877,7 @@ CVAAFFSoundPath* CVAAmbisonicsFreeFieldAudioRenderer::CreateSoundPath( CVAAFFSou
if( pSourceNew != nullptr )
pPath->oDirectivityStateNew.pData = ( IVADirectivity* ) pSourceNew->GetDirectivityData();
CVAListenerState* pListenerNew = ( m_pNewSceneState ? m_pNewSceneState->GetListenerState( iListenerID ) : nullptr );
CVAReceiverState* pListenerNew = ( m_pNewSceneState ? m_pNewSceneState->GetReceiverState( iListenerID ) : nullptr );
//if (pListenerNew != nullptr)
// pPath->oHRIRStateNew.pData = (IVAHRIRDataset*)pListenerNew->GetHRIRDataset();
......@@ -890,7 +896,7 @@ void CVAAmbisonicsFreeFieldAudioRenderer::DeleteSoundPath( CVAAFFSoundPath* pPat
m_pUpdateMessage->vDelPaths.push_back( pPath );
}
CVAAmbisonicsFreeFieldAudioRenderer::CVAAFFListener* CVAAmbisonicsFreeFieldAudioRenderer::CreateListener( const int iID, const CVAListenerState* pListenerState )
CVAAmbisonicsFreeFieldAudioRenderer::CVAAFFListener* CVAAmbisonicsFreeFieldAudioRenderer::CreateListener( const int iID, const CVAReceiverState* pListenerState )
{
VA_VERBOSE( "AmbisonicsFreeFieldAudioRenderer", "Creating listener with ID " << iID );
......@@ -1093,8 +1099,8 @@ void CVAAmbisonicsFreeFieldAudioRenderer::UpdateSoundPaths()
CVASoundSourceState* pSourceCur = ( m_pCurSceneState ? m_pCurSceneState->GetSoundSourceState( iSourceID ) : nullptr );
CVASoundSourceState* pSourceNew = ( m_pNewSceneState ? m_pNewSceneState->GetSoundSourceState( iSourceID ) : nullptr );
CVAListenerState* pListenerCur = ( m_pCurSceneState ? m_pCurSceneState->GetListenerState( iListenerID ) : nullptr );
CVAListenerState* pListenerNew = ( m_pNewSceneState ? m_pNewSceneState->GetListenerState( iListenerID ) : nullptr );
CVAReceiverState* pListenerCur = ( m_pCurSceneState ? m_pCurSceneState->GetReceiverState( iListenerID ) : nullptr );
CVAReceiverState* pListenerNew = ( m_pNewSceneState ? m_pNewSceneState->GetReceiverState( iListenerID ) : nullptr );
if( pSourceNew == nullptr )
{
......@@ -1372,5 +1378,4 @@ int CVAAmbisonicsFreeFieldAudioRenderer::GetIndex( int m, int n )
return ( n*n + n + m );
}
#endif // ( VACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD == 1 )
#endif // VACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD
......@@ -14,7 +14,7 @@
#ifndef IW_VACORE_AMBISONICSFREEFIELDAUDIORENDERER
#define IW_VACORE_AMBISONICSFREEFIELDAUDIORENDERER
#if( VACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD == 1 )
#ifdef VACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD
// VA includes
#include "../../../Motion/VAMotionModelBase.h"
......@@ -350,7 +350,7 @@ private:
const CVASceneState* pNewScene,
const CVASceneStateDiff* pDiff );
void UpdateSources();
CVAAFFListener* CreateListener( int iID, const CVAListenerState* );
CVAAFFListener* CreateListener( int iID, const CVAReceiverState* );
void DeleteListener( int iID );
CVAAFFSource* CreateSource( int iID, const CVASoundSourceState* );
void DeleteSource( int iID );
......@@ -368,8 +368,11 @@ private:
friend class CVAAFFSoundPath;
friend class CVAAFFListenerPoolFactory;
friend class CVAAFFSourcePoolFactory;
//! Not for use, avoid C4512
inline CVAAmbisonicsFreeFieldAudioRenderer operator=( const CVAAmbisonicsFreeFieldAudioRenderer & ) { VA_EXCEPT_NOT_IMPLEMENTED; };
};
#endif // ( VACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD==1 )
#endif // VACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD
#endif // IW_VACORE_AmbisonicsFREEFIELDAUDIORENDERER
......@@ -125,7 +125,7 @@ public:
struct PropPath
{
CVASourceListenerMetrics oRelations; //!< Informationen ber die Relation von Quelle und Hrer (Position & Orientierung)
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)
......@@ -285,6 +285,9 @@ public:
private:
CVACoreImpl* m_pCore;
const CVABinauralAirTrafficNoiseAudioRenderer::CVABATNSoundReceiver::Config& m_oListenerConf;
//! Not for use, avoid C4512
inline CVABATNSoundReceiverPoolFactory operator=( const CVABATNSoundReceiverPoolFactory & ) { VA_EXCEPT_NOT_IMPLEMENTED; };
};
class CVABATNSourcePoolFactory : public IVAPoolObjectFactory
......@@ -304,6 +307,9 @@ public:
private:
const CVABinauralAirTrafficNoiseAudioRenderer::CVABATNSource::Config& m_oSourceConf;
//! Not for use, avoid C4512
inline CVABATNSourcePoolFactory operator=( const CVABATNSourcePoolFactory & ) { VA_EXCEPT_NOT_IMPLEMENTED; };
};
// Renderer
......@@ -538,8 +544,8 @@ void CVABinauralAirTrafficNoiseAudioRenderer::ManageSoundPaths( const CVASceneSt
if( bDeletetionRequired == false )
{
// Receiver deleted?
std::vector< int >::const_iterator citr = pDiff->viDelListenerIDs.begin();
while( citr != pDiff->viDelListenerIDs.end() )
std::vector< int >::const_iterator citr = pDiff->viDelReceiverIDs.begin();
while( citr != pDiff->viDelReceiverIDs.end() )
{
const int& iIDListenerDeleted( *citr++ );
if( iListenerID == iIDListenerDeleted )
......@@ -574,8 +580,8 @@ void CVABinauralAirTrafficNoiseAudioRenderer::ManageSoundPaths( const CVASceneSt
}
// Deleted receivers
std::vector< int >::const_iterator citr = pDiff->viDelListenerIDs.begin();
while( citr != pDiff->viDelListenerIDs.end() )
std::vector< int >::const_iterator citr = pDiff->viDelReceiverIDs.begin();
while( citr != pDiff->viDelReceiverIDs.end() )
{
const int& iID( *citr++ );
DeleteListener( iID );
......@@ -592,16 +598,16 @@ void CVABinauralAirTrafficNoiseAudioRenderer::ManageSoundPaths( const CVASceneSt
}
// New receivers
citr = pDiff->viNewListenerIDs.begin();
while( citr != pDiff->viNewListenerIDs.end() )
citr = pDiff->viNewReceiverIDs.begin();
while( citr != pDiff->viNewReceiverIDs.end() )
{
const int& iID( *citr++ );
CVABATNSoundReceiver* pListener = CreateSoundReceiver( iID, pNewScene->GetListenerState( iID ) );
CVABATNSoundReceiver* pListener = CreateSoundReceiver( iID, pNewScene->GetReceiverState( iID ) );
}
// New paths: (1) new receivers, current sources
citr = pDiff->viNewListenerIDs.begin();
while( citr != pDiff->viNewListenerIDs.end() )
citr = pDiff->viNewReceiverIDs.begin();
while( citr != pDiff->viNewReceiverIDs.end() )
{
int iListenerID = ( *citr++ );
CVABATNSoundReceiver* pListener = m_mListeners[ iListenerID ];
......@@ -633,9 +639,9 @@ void CVABinauralAirTrafficNoiseAudioRenderer::ManageSoundPaths( const CVASceneSt
if( pSoundSourceDesc->sExplicitRendererID.empty() || pSoundSourceDesc->sExplicitRendererID == m_oParams.sID )
bForThisRenderer = true;
for( size_t i = 0; i < pDiff->viComListenerIDs.size(); i++ )
for( size_t i = 0; i < pDiff->viComReceiverIDs.size(); i++ )
{
int iListenerID = pDiff->viComListenerIDs[ i ];
int iListenerID = pDiff->viComReceiverIDs[ i ];
CVABATNSoundReceiver* pListener = m_mListeners[ iListenerID ];
if( !pListener->bDeleted && bForThisRenderer )
......@@ -654,8 +660,8 @@ void CVABinauralAirTrafficNoiseAudioRenderer::ManageSoundPaths( const CVASceneSt
if( !pSoundSourceDesc->sExplicitRendererID.empty() && pSoundSourceDesc->sExplicitRendererID != m_oParams.sID )
continue;
citr = pDiff->viNewListenerIDs.begin();
while( citr != pDiff->viNewListenerIDs.end() )
citr = pDiff->viNewReceiverIDs.begin();
while( citr != pDiff->viNewReceiverIDs.end() )
{
const int& iListenerID( *citr++ );
CVABATNSoundReceiver* pListener = m_mListeners[ iListenerID ];
......@@ -710,7 +716,7 @@ void CVABinauralAirTrafficNoiseAudioRenderer::ProcessStream( const ITAStreamInfo
while( spit != ctxAudio.m_lSoundPaths.end() )
{
CVABATNSoundPath* pPath( *spit );
CVAListenerState* pListenerState = ( m_pCurSceneState ? m_pCurSceneState->GetListenerState( pPath->pSoundReceiver->pData->iID ) : NULL );
CVAReceiverState* pListenerState = ( m_pCurSceneState ? m_pCurSceneState->GetReceiverState( pPath->pSoundReceiver->pData->iID ) : NULL );
CVASoundSourceState* pSourceState = ( m_pCurSceneState ? m_pCurSceneState->GetSoundSourceState( pPath->pSoundSource->pData->iID ) : NULL );
if( pListenerState == nullptr || pSourceState == nullptr )
......@@ -916,8 +922,8 @@ void CVABinauralAirTrafficNoiseAudioRenderer::UpdateTrajectories()
int iListenerID = it->first;
CVABATNSoundReceiver* pListener = it->second;
CVAListenerState* pListenerCur = ( m_pCurSceneState ? m_pCurSceneState->GetListenerState( iListenerID ) : nullptr );
CVAListenerState* pListenerNew = ( m_pNewSceneState ? m_pNewSceneState->GetListenerState( iListenerID ) : nullptr );
CVAReceiverState* pListenerCur = ( m_pCurSceneState ? m_pCurSceneState->GetReceiverState( iListenerID ) : nullptr );
CVAReceiverState* pListenerNew = ( m_pNewSceneState ? m_pNewSceneState->GetReceiverState( iListenerID ) : nullptr );
const CVAMotionState* pMotionCur = ( pListenerCur ? pListenerCur->GetMotionState() : nullptr );
const CVAMotionState* pMotionNew = ( pListenerNew ? pListenerNew->GetMotionState() : nullptr );
......@@ -978,7 +984,7 @@ CVABATNSoundPath* CVABinauralAirTrafficNoiseAudioRenderer::CreateSoundPath( CVAB
pPath->oRefSoundPath.oDirectivityStateNew.pData = ( IVADirectivity* ) pSourceNew->GetDirectivityData();
}
CVAListenerState* pListenerNew = ( m_pNewSceneState ? m_pNewSceneState->GetListenerState( iListenerID ) : nullptr );
CVAReceiverState* pListenerNew = ( m_pNewSceneState ? m_pNewSceneState->GetReceiverState( iListenerID ) : nullptr );
if( pListenerNew != nullptr )
{
pPath->oDirSoundPath.oSoundReceiverDirectivityStateNew.pData = ( IVADirectivity* ) pListenerNew->GetDirectivity();
......@@ -1000,7 +1006,7 @@ void CVABinauralAirTrafficNoiseAudioRenderer::DeleteSoundPath( CVABATNSoundPath*
m_pUpdateMessage->vDelPaths.push_back( pPath );
}
CVABinauralAirTrafficNoiseAudioRenderer::CVABATNSoundReceiver* CVABinauralAirTrafficNoiseAudioRenderer::CreateSoundReceiver( int iID, const CVAListenerState* pListenerState )
CVABinauralAirTrafficNoiseAudioRenderer::CVABATNSoundReceiver* CVABinauralAirTrafficNoiseAudioRenderer::CreateSoundReceiver( int iID, const CVAReceiverState* pListenerState )
{
VA_VERBOSE( "BinauralAirTrafficNoiseAudioRenderer", "Creating listener with ID " << iID );
......@@ -1190,8 +1196,8 @@ void CVABinauralAirTrafficNoiseAudioRenderer::UpdateSoundPaths()
CVASoundSourceState* pSourceCur = ( m_pCurSceneState ? m_pCurSceneState->GetSoundSourceState( iSourceID ) : nullptr );
CVASoundSourceState* pSourceNew = ( m_pNewSceneState ? m_pNewSceneState->GetSoundSourceState( iSourceID ) : nullptr );
CVAListenerState* pListenerCur = ( m_pCurSceneState ? m_pCurSceneState->GetListenerState( iListenerID ) : nullptr );
CVAListenerState* pListenerNew = ( m_pNewSceneState ? m_pNewSceneState->GetListenerState( iListenerID ) : nullptr );
CVAReceiverState* pListenerCur = ( m_pCurSceneState ? m_pCurSceneState->GetReceiverState( iListenerID ) : nullptr );
CVAReceiverState* pListenerNew = ( m_pNewSceneState ? m_pNewSceneState->GetReceiverState( iListenerID ) : nullptr );
if( pSourceNew == nullptr )
{
......
......@@ -295,7 +295,7 @@ private:
void ManageSoundPaths( const CVASceneState* pCurScene, const CVASceneState* pNewScene, const CVASceneStateDiff* pDiff );
void UpdateSources();
CVABATNSoundReceiver* CreateSoundReceiver( int iID, const CVAListenerState* );
CVABATNSoundReceiver* CreateSoundReceiver( int iID, const CVAReceiverState* );
void DeleteListener( int iID );
CVABATNSource* CreateSoundSource( int iID, const CVASoundSourceState* );
void DeleteSource( int iID );
......@@ -313,6 +313,9 @@ private:
friend class CVABATNSoundPath;
friend class CVABATNSoundReceiverPoolFactory;
friend class CVABATNSourcePoolFactory;
//! Not for use, avoid C4512
inline CVABinauralAirTrafficNoiseAudioRenderer operator=( const CVABinauralAirTrafficNoiseAudioRenderer & ) { VA_EXCEPT_NOT_IMPLEMENTED; };
};
#endif // VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE
......
......@@ -13,7 +13,7 @@
#include "VABinauralArtificialReverb.h"
#if ( VACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB == 1 )
#ifdef VACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB
// VA includes
#include "../../../directivities/VADirectivityDAFFEnergetic.h"
......@@ -79,7 +79,7 @@ public:
CVABinauralArtificialReverbAudioRenderer::Source* pSource;
CVABinauralArtificialReverbAudioRenderer::Listener* pListener;
CVASourceListenerMetrics oRelations; //!< Positions, orientations
CVASourceReceiverMetrics oRelations; //!< Positions, orientations
CITAVariableDelayLine* pVariableDelayLine; //!< DSP
......@@ -606,8 +606,8 @@ void CVABinauralArtificialReverbAudioRenderer::ManageArtificialReverbPaths( cons
if( !bDelete )
{
// Hrer gelscht? (Hrer-ID in Lschliste)
for( std::vector<int>::const_iterator cit = pDiff->viDelListenerIDs.begin();
cit != pDiff->viDelListenerIDs.end(); ++cit )
for( std::vector<int>::const_iterator cit = pDiff->viDelReceiverIDs.begin();
cit != pDiff->viDelReceiverIDs.end(); ++cit )
{