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

Renaming a lot of classes (listener -> receiver

parents 1605d764 584d070d
......@@ -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;
......@@ -491,8 +491,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 +523,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 +543,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 ) );
}
// 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 ];
......@@ -606,8 +606,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 ];
......
......@@ -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)
......@@ -538,8 +538,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 +574,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 +592,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 ) );
}
// 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 ];
......@@ -654,8 +654,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 ];
......
......@@ -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 )
{
if( iListenerID == ( *cit ) )
{
......@@ -643,13 +643,13 @@ void CVABinauralArtificialReverbAudioRenderer::ManageArtificialReverbPaths( cons
DeleteSource( *cit );
}
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 )
{
DeleteListener( *cit );
}
// Neue Pfade anlegen: ( neue Hrer ) verknpfen mit ( aktuellen Quellen + neuen Quellen )
for( std::vector<int>::const_iterator lcit = pDiff->viNewListenerIDs.begin(); lcit != pDiff->viNewListenerIDs.end(); ++lcit )
for( std::vector<int>::const_iterator lcit = pDiff->viNewReceiverIDs.begin(); lcit != pDiff->viNewReceiverIDs.end(); ++lcit )
{
const int iListenerID = ( *lcit );
......
......@@ -126,7 +126,7 @@ public:
CVABinauralFreeFieldAudioRenderer::CVABFFSource* pSource;
CVABinauralFreeFieldAudioRenderer::CVABFFListener* pListener;
CVASourceListenerMetrics oRelations; //!< Informatioen on source and receiver relations (distances & angles)
CVASourceReceiverMetrics oRelations; //!< Informatioen on source and receiver relations (distances & angles)
CDirectivityState oDirectivityStateCur;
CDirectivityState oDirectivityStateNew;
......@@ -497,8 +497,8 @@ void CVABinauralFreeFieldAudioRenderer::ManageSoundPaths( const CVASceneState* p
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 )
......@@ -529,8 +529,8 @@ void CVABinauralFreeFieldAudioRenderer::ManageSoundPaths( const CVASceneState* p
}
// 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 );
......@@ -549,16 +549,16 @@ void CVABinauralFreeFieldAudioRenderer::ManageSoundPaths( const CVASceneState* p
}
// New receivers
citr = pDiff->viNewListenerIDs.begin();
while( citr != pDiff->viNewListenerIDs.end() )
citr = pDiff->viNewReceiverIDs.begin();
while( citr != pDiff->viNewReceiverIDs.end() )
{
const int& iID( *citr++ );
CVABFFListener* pListener = CreateListener( iID, pNewScene->GetListenerState( 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++ );
CVABFFListener* pListener = m_mListeners[ iListenerID ];
......@@ -612,8 +612,8 @@ void CVABinauralFreeFieldAudioRenderer::ManageSoundPaths( const CVASceneState* p
CVABFFSource* 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++ );
CVABFFListener* pListener = m_mListeners[ iListenerID ];
......
......@@ -450,7 +450,7 @@ public:
Source* pSource; //!< Verknpfte Quelle
Listener* pListener; //!< Verknpfter Hrer
CVASourceListenerMetrics oRelations; //!< Informatioen ber die Relation von Quelle und Hrer (Position & Orientierung)
CVASourceReceiverMetrics oRelations; //!< Informatioen ber die Relation von Quelle und Hrer (Position & Orientierung)
// Spter fr retardierte Infos: Metrics oMetrics;
bool bDirectSoundAudible; //!< Direktschall hrbar (true) bzw. verdeckt (false)
......@@ -1438,8 +1438,8 @@ void CVARoomAcousticsAudioRenderer::ManageComplexSoundPaths( const CVASceneState
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 )
{
if( iListenerID == ( *cit ) )
{
......@@ -1474,14 +1474,14 @@ void CVARoomAcousticsAudioRenderer::ManageComplexSoundPaths( const CVASceneState
DeleteSource( *cit );
}
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 )
{
DeleteListener( *cit );
}
// Neue Pfade anlegen: ( neue Hrer ) verknpfen mit ( aktuellen Quellen ) // + neuen Quellen )
for( std::vector<int>::const_iterator lcit = pDiff->viNewListenerIDs.begin(); lcit != pDiff->viNewListenerIDs.end(); ++lcit )
for( std::vector<int>::const_iterator lcit = pDiff->viNewReceiverIDs.begin(); lcit != pDiff->viNewReceiverIDs.end(); ++lcit )
{
int iListenerID = ( *lcit );
......@@ -1540,10 +1540,10 @@ void CVARoomAcousticsAudioRenderer::ManageComplexSoundPaths( const CVASceneState
}
// Neue Hrer
for( int i = 0; i < ( int ) pDiff->viNewListenerIDs.size(); i++ )
for( int i = 0; i < ( int ) pDiff->viNewReceiverIDs.size(); i++ )
{
// Neuen Pfad erzeugen zu neuer Quelle
int iListenerID = pDiff->viNewListenerIDs[ i ];
int iListenerID = pDiff->viNewReceiverIDs[ i ];
Listener* pListener = m_mListener[ iListenerID ];
ComplexSoundPath* pPath = CreateComplexSoundPath( pSource, pListener );
}
......
......@@ -48,7 +48,7 @@ class CVASoundSourceDesc;
// Internal forwards
class CVAMFFSoundPath;
class CVAMFFSoundPathFactory;
class CVAPFFSoundPathFactory;
//! Monaural Freefield Audio Renderer
/**
......@@ -113,13 +113,12 @@ public:
//! Returns the renderers output stream datasource
ITADatasource* GetOutputDatasource();
CVAStruct CallObject( const CVAStruct& oArgs );
protected:
//! Internal source representation
class CVAMFFSource : public CVAPoolObject
class CVAPFFSource : public CVAPoolObject
{
public:
class Config
......@@ -134,7 +133,7 @@ protected:
int iMotionModelNumHistoryKeys;
};
CVAMFFSource( const Config& oConf_ )
CVAPFFSource( const Config& oConf_ )
: oConf( oConf_ )
{};
......@@ -180,7 +179,7 @@ protected:
//! Internal listener representation
class CVAMFFListener : public CVAPoolObject
class CVAPFFReceiver : public CVAPoolObject
{
public:
class Config
......@@ -195,7 +194,7 @@ protected:
int iMotionModelNumHistoryKeys;
};
CVAMFFListener( CVACoreImpl* pCore, const Config& oConf )
CVAPFFReceiver( CVACoreImpl* pCore, const Config& oConf )
: pCore( pCore ), oConf( oConf )
{};
......@@ -257,32 +256,34 @@ private:
int m_iCurGlobalAuralizationMode;
IVAObjectPool* m_pSoundPathPool;
CVAMFFSoundPathFactory* m_pSoundPathFactory;
CVAPFFSoundPathFactory* m_pSoundPathFactory;
std::list< CVAMFFSoundPath* > m_lSoundPaths; //!< List of sound paths in user context (VACore calls)
IVAObjectPool* m_pSourcePool;
IVAObjectPool* m_pListenerPool;
std::map< int, CVAMFFSource* > m_mSources; //!< Internal list of sources
std::map< int, CVAMFFListener* > m_mListeners; //!< Internal list of listener
std::map< int, CVAPFFSource* > m_mSources; //!< Internal list of sources
std::map< int, CVAPFFReceiver* > m_mReceivers; //!< Internal list of listener
int m_iDefaultVDLSwitchingAlgorithm;
bool m_bDumpListenerOutputSignals; //!< Listener dumping enabled
double m_dDumpListenerOutputGain; //!< Listener dumping output gain (avoid clipping but preserve gain)
bool m_bRecordSoundReceiverOutputSignals; //!< Listener dumping enabled
double m_dRecordSoundReceiverOutputGain; //!< Listener dumping output gain (avoid clipping but preserve gain)
std::string m_sBaseFolder; //!< Base folder where dumps and motion stuff can go
int m_iRecordSoundReceiversNumChannels; //!< Number of maximum channels for a sound receiver
CVAMFFListener::Config m_oDefaultListenerConf; //!< Default listener config for factory object creation
CVAMFFSource::Config m_oDefaultSourceConf; //!< Default source config for factory object creation
CVAPFFReceiver::Config m_oDefaultListenerConf; //!< Default listener config for factory object creation
CVAPFFSource::Config m_oDefaultSourceConf; //!< Default source config for factory object creation
class CVAMFFUpdateMessage : public CVAPoolObject
class CVAPFFUpdateMessage : public CVAPoolObject
{
public:
std::list< CVAMFFSource* > vNewSources;
std::list< CVAMFFSource* > vDelSources;
std::list< CVAMFFListener* > vNewListeners;
std::list< CVAMFFListener* > vDelListeners;
std::list< CVAPFFSource* > vNewSources;
std::list< CVAPFFSource* > vDelSources;
std::list< CVAPFFReceiver* > vNewReceivers;
std::list< CVAPFFReceiver* > vDelReceivers;
std::list< CVAMFFSoundPath* > vNewPaths;
std::list< CVAMFFSoundPath* > vDelPaths;
......@@ -290,22 +291,22 @@ private:
{
vNewSources.clear();
vDelSources.clear();
vNewListeners.clear();
vDelListeners.clear();
vNewReceivers.clear();
vDelReceivers.clear();
vNewPaths.clear();
vDelPaths.clear();
}
};
IVAObjectPool* m_pUpdateMessagePool; // really necessary?
CVAMFFUpdateMessage* m_pUpdateMessage;
CVAPFFUpdateMessage* m_pUpdateMessage;
//! Data in context of audio process
struct
{
tbb::concurrent_queue< CVAMFFUpdateMessage* > m_qpUpdateMessages; //!< Update messages list
tbb::concurrent_queue< CVAPFFUpdateMessage* > m_qpUpdateMessages; //!< Update messages list
std::list< CVAMFFSoundPath* > m_lSoundPaths; //!< List of sound paths
std::list< CVAMFFSource* > m_lSources; //!< List of sources
std::list< CVAMFFListener* > m_lListeners; //!< List of listeners
std::list< CVAPFFSource* > m_lSources; //!< List of sources
std::list< CVAPFFReceiver* > m_lReceivers; //!< List of receivers
ITASampleBuffer m_sbTemp; //!< Temporally used buffer to store a block of samples during processing
ITAAtomicInt m_iResetFlag; //!< Reset status flag: 0=normal_op, 1=reset_request, 2=reset_ack
ITAAtomicInt m_iStatus; //!< Current status flag: 0=stopped, 1=running
......@@ -317,11 +318,11 @@ private:
const CVASceneState* pNewScene,
const CVASceneStateDiff* pDiff );
void UpdateSources();
CVAMFFListener* CreateListener( int iID, const CVAListenerState* );
void DeleteListener( int iID );
CVAMFFSource* CreateSource( int iID, const CVASoundSourceState* );
CVAPFFReceiver* CreateReceiver( int iID, const CVAReceiverState* );
void DeleteReceiver( int iID );
CVAPFFSource* CreateSource( int iID, const CVASoundSourceState* );
void DeleteSource( int iID );
CVAMFFSoundPath* CreateSoundPath( CVAMFFSource*, CVAMFFListener* );
CVAMFFSoundPath* CreateSoundPath( CVAPFFSource*, CVAPFFReceiver* );
void DeleteSoundPath( CVAMFFSoundPath* );
void UpdateTrajectories();
......
......@@ -343,8 +343,8 @@ void CVAPTGenericPathAudioRenderer::ManageSoundPaths( const CVASceneState* pCurS
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 )
......@@ -375,8 +375,8 @@ void CVAPTGenericPathAudioRenderer::ManageSoundPaths( const CVASceneState* pCurS
}
// 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 );
......@@ -391,16 +391,16 @@ void CVAPTGenericPathAudioRenderer::ManageSoundPaths( const CVASceneState* pCurS
}
// New receivers
citr = pDiff->viNewListenerIDs.begin();
while( citr != pDiff->viNewListenerIDs.end() )
citr = pDiff->viNewReceiverIDs.begin();
while( citr != pDiff->viNewReceiverIDs.end() )
{
const int& iID( *citr++ );
CVAPTGPListener* pListener = CreateListener( iID, pNewScene->GetListenerState( 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++ );
CVAPTGPListener* pListener = m_mListeners[iListenerID];
......@@ -437,8 +437,8 @@ void CVAPTGenericPathAudioRenderer::ManageSoundPaths( const CVASceneState* pCurS
const int& iSourceID( *cits++ );
CVAPTGPSource* pSource = m_mSources[iSourceID];
citr = pDiff->viNewListenerIDs.begin();
while( citr != pDiff->viNewListenerIDs.end() )
citr = pDiff->viNewReceiverIDs.begin();
while( citr != pDiff->viNewReceiverIDs.end() )
{
const int& iListenerID( *citr++ );
CVAPTGPListener* pListener = m_mListeners[iListenerID];
......
......@@ -125,7 +125,7 @@ public:
CVAPTHearingAidRenderer::Source* pSource;
CVAPTHearingAidRenderer::Listener* pListener;
CVASourceListenerMetrics oRelations; //!< Informatioen on source and receiver relations (distances & angles)
CVASourceReceiverMetrics oRelations; //!< Informatioen on source and receiver relations (distances & angles)
CDirectivityState oDirectivityStateCur;
CDirectivityState oDirectivityStateNew;
......@@ -525,8 +525,8 @@ void CVAPTHearingAidRenderer::ManageSoundPaths( const CVASceneState* pCurScene,
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 )
{
if( iListenerID == ( *cit ) ) {
bDelete = true; // Pfad zum Lschen markieren
......@@ -551,8 +551,8 @@ void CVAPTHearingAidRenderer::ManageSoundPaths( const CVASceneState* pCurScene,
DeleteSource( *cit );
}
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 )
{
DeleteListener( *cit );
}
......@@ -566,16 +566,16 @@ void CVAPTHearingAidRenderer::ManageSoundPaths( const CVASceneState* pCurScene,
}
// Neue Hrer anlegen
for( std::vector<int>::const_iterator lcit = pDiff->viNewListenerIDs.begin();
lcit != pDiff->viNewListenerIDs.end(); ++lcit )
for( std::vector<int>::const_iterator lcit = pDiff->viNewReceiverIDs.begin();
lcit != pDiff->viNewReceiverIDs.end(); ++lcit )
{
int iListenerID = ( *lcit );
Listener* pListener = CreateListener( iListenerID, pNewScene->GetListenerState( iListenerID ) );
}
// Neue Pfade anlegen: (1) Neue Hrer mit aktuellen Quellen
for( std::vector<int>::const_iterator lcit = pDiff->viNewListenerIDs.begin();
lcit != pDiff->viNewListenerIDs.end(); ++lcit )
for( std::vector<int>::const_iterator lcit = pDiff->viNewReceiverIDs.begin();
lcit != pDiff->viNewReceiverIDs.end(); ++lcit )
{
int iListenerID = ( *lcit );
Listener* pListener = m_mListeners[ iListenerID ];
......@@ -618,8 +618,8 @@ void CVAPTHearingAidRenderer::ManageSoundPaths( const CVASceneState* pCurScene,
int iSourceID = ( *scit );
Source* pSource = m_mSources[ iSourceID ];
for( std::vector<int>::const_iterator lcit = pDiff->viNewListenerIDs.begin();
lcit != pDiff->viNewListenerIDs.end(); ++lcit )
for( std::vector<int>::const_iterator lcit = pDiff->viNewReceiverIDs.begin();
lcit != pDiff->viNewReceiverIDs.end(); ++lcit )
{
int iListenerID = ( *lcit );
Listener* pListener = m_mListeners[ iListenerID ];
......
......@@ -471,7 +471,7 @@ void CVASceneState::Diff( const CVASceneState* pState, CVASceneStateDiff* pDiff
// Diff nach nullptr-Pointer (alles neu)
if( pState == nullptr ) {
data.m_pSources->Diff( nullptr, pDiff->viNewSoundSourceIDs, pDiff->viDelSoundSourceIDs, pDiff->viComSoundSourceIDs );
data.m_pListeners->Diff( nullptr, pDiff->viNewListenerIDs, pDiff->viDelListenerIDs, pDiff->viComListenerIDs );
data.m_pListeners->Diff( nullptr, pDiff->viNewReceiverIDs, pDiff->viDelReceiverIDs, pDiff->viComListenerIDs );
data.m_pPortals->Diff( nullptr, pDiff->viNewPortalIDs, pDiff->viDelPortalIDs, pDiff->viComPortalIDs );
data.m_pSurfaces->Diff( nullptr, pDiff->viNewSurfaceIDs, pDiff->viDelSurfaceIDs, pDiff->viComSurfaceIDs );
......@@ -494,15 +494,15 @@ void CVASceneState::Diff( const CVASceneState* pState, CVASceneStateDiff* pDiff
if( data.m_pListeners != pState->data.m_pListeners ) {
data.m_pListeners->Diff( pState->data.m_pListeners,
pDiff->viNewListenerIDs,
pDiff->viDelListenerIDs,
pDiff->viNewReceiverIDs,
pDiff->viDelReceiverIDs,
pDiff->viComListenerIDs );
}
else {
// Erhaltene Objekt bleiben erhalten. Keine neuen oder gelschten Objekte.
data.m_pListeners->GetIDs( &pDiff->viComListenerIDs );
pDiff->viNewListenerIDs.clear();
pDiff->viDelListenerIDs.clear();
pDiff->viNewReceiverIDs.clear();
pDiff->viDelReceiverIDs.clear();
}
if( data.m_pPortals != pState->data.m_pPortals ) {
......
......@@ -184,8 +184,8 @@ public:
std::vector< int > viDelSoundSourceIDs; // IDs gelschter Schallquellen
std::vector< int > viComSoundSourceIDs; // IDs erhaltener Schallquellen
std::vector< int > viNewListenerIDs; // IDs neu erzeugter Hrer
std::vector< int > viDelListenerIDs; // IDs gelschter Hrer
std::vector< int > viNewReceiverIDs; // IDs neu erzeugter Hrer
std::vector< int > viDelReceiverIDs; // IDs gelschter Hrer
std::vector< int > viComListenerIDs; // IDs erhaltener Hrer
std::vector< int > viNewPortalIDs; // IDs neu erzeugter Portale
......
......@@ -19,7 +19,7 @@
#include "Utils/VAUtils.h"
#include <VAException.h>