Commit a206476d authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen

Finalizing merge for offline simulation feature

parents 2e7826d0 435ff750
......@@ -57,6 +57,10 @@ vista_use_package( Eigen REQUIRED )
# Optional packages
vista_find_package( RavenNet QUIET )
if( ITA_VA_CORE_LIBS_FFT_USES_FFTW3 )
set( ITA_VA_COPYING_GNU_GPL ON PARENT_SCOPE )
endif( )
if( NOT DEFINED ITA_VACORE_VERSION_MAJOR )
set( ITA_VACORE_VERSION_MAJOR "v2018" CACHE STRING "VACore version major (usually 'v' and year)" )
endif( )
......@@ -116,8 +120,8 @@ endif( )
if( NOT DEFINED ITA_VACORE_WITH_AUDIO_BACKEND_PORTAUDIO )
set( ITA_VACORE_WITH_AUDIO_BACKEND_PORTAUDIO ON CACHE BOOL "Build VACore with Portaudio audio backend support" )
endif( )
if( NOT DEFINED ITA_VACORE_WITH_AUDIO_BACKEND_DUMMY )
set( ITA_VACORE_WITH_AUDIO_BACKEND_DUMMY OFF CACHE BOOL "Build VACore with dummy audio backend support" )
if( NOT DEFINED ITA_VACORE_WITH_AUDIO_BACKEND_VIRTUAL )
set( ITA_VACORE_WITH_AUDIO_BACKEND_VIRTUAL OFF CACHE BOOL "Build VACore with virtual audio backend support (for offline simulations)" )
endif( )
......@@ -254,8 +258,8 @@ endif( )
if( ITA_VACORE_WITH_AUDIO_BACKEND_PORTAUDIO )
add_definitions( -DVACORE_WITH_AUDIO_BACKEND_PORTAUDIO )
endif( )
if( ITA_VACORE_WITH_AUDIO_BACKEND_DUMMY )
add_definitions( -DVACORE_WITH_AUDIO_BACKEND_DUMMY )
if( ITA_VACORE_WITH_AUDIO_BACKEND_VIRTUAL )
add_definitions( -DVACORE_WITH_AUDIO_BACKEND_VIRTUAL )
endif( )
# Rendering definitions
......
......@@ -36,9 +36,7 @@
#include <sstream>
CVAAudioSignalSourceManager::CVAAudioSignalSourceManager( CVACoreImpl* pParentCore,
const CVAAudioDriverConfig& oAudioDriverConfig,
ITADatasource* pDeviceInputSource )
CVAAudioSignalSourceManager::CVAAudioSignalSourceManager( CVACoreImpl* pParentCore, const CVAAudioDriverConfig& oAudioDriverConfig, ITADatasource* pDeviceInputSource )
: m_pParentCore( pParentCore ),
m_dSamplerate( oAudioDriverConfig.dSampleRate ),
m_iBlocklength( oAudioDriverConfig.iBuffersize ),
......
......@@ -35,8 +35,8 @@ void CVAAudioDriverConfig::Init( const CVAStruct& oArgs )
CVAConfigInterpreter conf( oArgs );
conf.OptNonEmptyString( "Driver", sDriver );
conf.OptString( "Device", sDevice, "AUTO" );
conf.OptNumber( "Samplerate", dSampleRate, DEFAULT_SAMPLERATE );
conf.OptInteger( "Buffersize", iBuffersize, AUTO, &lits );
conf.OptNumber( "SampleRate", dSampleRate, DEFAULT_SAMPLERATE );
conf.OptInteger( "BufferSize", iBuffersize, AUTO, &lits );
conf.OptInteger( "InputChannels", iInputChannels, AUTO, &lits );
conf.OptInteger( "OutputChannels", iOutputChannels, AUTO, &lits );
......@@ -48,9 +48,8 @@ void CVAAudioDriverConfig::Init( const CVAStruct& oArgs )
VA_EXCEPT1( "Invalid buffersize specified" );
if( ( iInputChannels < 0 ) && ( iInputChannels != AUTO ) )
VA_EXCEPT1( "Invalid number of input channels specified" );
VA_EXCEPT1( "Invalid number of input channels specified (autodetect = -1 or AUTO)" );
// @todo: really?! I don't see a point why single channel output shouldn't be supported.
if( ( iOutputChannels < 2 ) && ( iOutputChannels != AUTO ) )
VA_EXCEPT1( "Invalid number of output channels specified (at least two)" );
if( ( iOutputChannels < 1 ) && ( iOutputChannels != AUTO ) )
VA_EXCEPT1( "Invalid number of output channels specified (at least one required, if not using autodetect ... -1 or AUTO)" );
}
#include "VADummyAudioDriverBackend.h"
#include "VAVirtualAudioDriverBackend.h"
#include "../../Utils/VADebug.h"
#include <VAException.h>
#include <ITAException.h>
#include <ITANumericUtils.h>
......@@ -8,8 +9,8 @@
#include <cassert>
CVADummyAudioDriverBackend::CVADummyAudioDriverBackend( const CVAAudioDriverConfig* pConfig )
: CVAObject( "VirtualAudioDriver" )
CVAVirtualAudioDriverBackend::CVAVirtualAudioDriverBackend( const CVAAudioDriverConfig* pConfig )
: CVAObject( "VirtualAudioDevice" )
, m_oConfig( *pConfig )
, m_pDataSource( NULL )
, m_bStarted( false )
......@@ -19,72 +20,77 @@ CVADummyAudioDriverBackend::CVADummyAudioDriverBackend( const CVAAudioDriverConf
m_oOutputStreamProps.uiBlocklength = ( unsigned int ) m_oConfig.iBuffersize;
}
CVADummyAudioDriverBackend::~CVADummyAudioDriverBackend()
CVAVirtualAudioDriverBackend::~CVAVirtualAudioDriverBackend()
{
}
std::string CVADummyAudioDriverBackend::getDriverName() const
std::string CVAVirtualAudioDriverBackend::getDriverName() const
{
return "Dummy";
return "Virtual";
}
std::string CVADummyAudioDriverBackend::getDeviceName() const
std::string CVAVirtualAudioDriverBackend::getDeviceName() const
{
return "Dummy";
return "Trigger";
}
int CVADummyAudioDriverBackend::getNumberOfInputs() const
int CVAVirtualAudioDriverBackend::getNumberOfInputs() const
{
return m_oConfig.iInputChannels;
}
const ITAStreamProperties* CVADummyAudioDriverBackend::getOutputStreamProperties() const
const ITAStreamProperties* CVAVirtualAudioDriverBackend::getOutputStreamProperties() const
{
return &m_oOutputStreamProps;
}
void CVADummyAudioDriverBackend::setOutputStreamDatasource( ITADatasource* pDatasource )
void CVAVirtualAudioDriverBackend::setOutputStreamDatasource( ITADatasource* pDatasource )
{
m_pDataSource = pDatasource;
}
ITADatasource* CVADummyAudioDriverBackend::getInputStreamDatasource() const
ITADatasource* CVAVirtualAudioDriverBackend::getInputStreamDatasource() const
{
return nullptr;
}
void CVADummyAudioDriverBackend::initialize()
void CVAVirtualAudioDriverBackend::initialize()
{
}
void CVADummyAudioDriverBackend::finalize()
void CVAVirtualAudioDriverBackend::finalize()
{
}
void CVADummyAudioDriverBackend::startStreaming()
void CVAVirtualAudioDriverBackend::startStreaming()
{
m_bStarted = true;
}
bool CVADummyAudioDriverBackend::isStreaming()
bool CVAVirtualAudioDriverBackend::isStreaming()
{
return m_bStarted;
}
void CVADummyAudioDriverBackend::stopStreaming()
void CVAVirtualAudioDriverBackend::stopStreaming()
{
m_bStarted = false;
}
CVAStruct CVADummyAudioDriverBackend::CallObject( const CVAStruct& oArgs )
CVAStruct CVAVirtualAudioDriverBackend::CallObject( const CVAStruct& oArgs )
{
CVAStruct oReturn;
if( oArgs.HasKey( "trigger" ) && m_pDataSource )
{
// Trigger block pointer getter, then increment
for( int n = 0; n < (int) m_pDataSource->GetNumberOfChannels(); n++ )
m_pDataSource->GetBlockPointer( n, &m_oStreamInfo );
m_pDataSource->IncrementBlockPointer();
}
if( oArgs.HasKey( "help" ) || oArgs.HasKey( "info" ) )
{
......@@ -93,3 +99,48 @@ CVAStruct CVADummyAudioDriverBackend::CallObject( const CVAStruct& oArgs )
return oReturn;
}
CVAVirtualAudioDriverBackend::ManualClock::ManualClock()
: CVAObject( "ManualClock" )
, m_dTime( 0.0f )
{
}
CVAVirtualAudioDriverBackend::ManualClock::~ManualClock()
{
}
double CVAVirtualAudioDriverBackend::ManualClock::getTime()
{
m_csTime.enter();
double dTime = m_dTime;
m_csTime.leave();
return dTime;
}
void CVAVirtualAudioDriverBackend::ManualClock::SetTime( double dNow )
{
m_csTime.enter();
assert( m_dTime < dNow );
m_dTime = dNow;
m_csTime.leave();
}
CVAStruct CVAVirtualAudioDriverBackend::ManualClock::CallObject( const CVAStruct& oArgs )
{
if( oArgs.HasKey( "info" ) || oArgs.HasKey( "help" ) )
{
CVAStruct oRet;
oRet[ "usage" ] = "Set the manual clock with the key 'time' and a floating point value. Time has to be strict monotonously increasing";
return oRet;
}
else if( oArgs.HasKey( "time" ) )
{
SetTime( oArgs[ "time" ] );
return CVAStruct();
}
else
{
VA_EXCEPT2( INVALID_PARAMETER, "Could npt understand call, 'time' key missing. use 'help' for more information" );
}
}
......@@ -11,8 +11,8 @@
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VACORE_DUMMY_AUDIO_DRIVER_BACKEND
#define IW_VACORE_DUMMY_AUDIO_DRIVER_BACKEND
#ifndef IW_VACORE_VIRTUAL_AUDIO_DRIVER_BACKEND
#define IW_VACORE_VIRTUAL_AUDIO_DRIVER_BACKEND
#include "VAAudioDriverBackend.h"
#include "VAAudioDriverConfig.h"
......@@ -21,14 +21,17 @@
#include <ITAStreamProperties.h>
#include <ITADatasource.h>
#include <ITACriticalSection.h>
#include <ITAClock.h>
#include <ITAStreamInfo.h>
#pragma warning( disable : 4512 ) // yep no copy constructor
class CVADummyAudioDriverBackend : public IVAAudioDriverBackend, public CVAObject
class CVAVirtualAudioDriverBackend : public IVAAudioDriverBackend, public CVAObject
{
public:
CVADummyAudioDriverBackend( const CVAAudioDriverConfig* pConfig );
~CVADummyAudioDriverBackend();
CVAVirtualAudioDriverBackend( const CVAAudioDriverConfig* pConfig );
~CVAVirtualAudioDriverBackend();
std::string getDriverName() const;
std::string getDeviceName() const;
......@@ -45,11 +48,28 @@ public:
CVAStruct CallObject( const CVAStruct& oArgs );
class ManualClock : public ITAClock, public CVAObject
{
public:
ManualClock();
~ManualClock();
inline std::string getName() const { return "ManualClock"; };
inline double getResolution() const { return -1.0f; };
double getFrequency() const { return -1.0f; };
inline double getTime();
inline void SetTime( const double dManualNow );
CVAStruct CallObject( const CVAStruct& oArgs );
private:
ITACriticalSection m_csTime;
double m_dTime;
};
private:
const CVAAudioDriverConfig m_oConfig;
ITAStreamProperties m_oOutputStreamProps;
ITAStreamInfo m_oStreamInfo;
ITADatasource* m_pDataSource;
bool m_bStarted;
};
#endif // IW_VACORE_DUMMY_AUDIO_DRIVER_BACKEND
#endif // IW_VACORE_VIRTUAL_AUDIO_DRIVER_BACKEND
......@@ -17,8 +17,8 @@ endif( )
if( ITA_VACORE_WITH_AUDIO_BACKEND_PORTAUDIO )
list( APPEND DirFiles VAPortaudioBackend.cpp VAPortaudioBackend.h )
endif( )
if( ITA_VACORE_WITH_AUDIO_BACKEND_DUMMY )
list( APPEND DirFiles VADummyAudioDriverBackend.cpp VADummyAudioDriverBackend.h )
if( ITA_VACORE_WITH_AUDIO_BACKEND_VIRTUAL )
list( APPEND DirFiles VAVirtualAudioDriverBackend.cpp VAVirtualAudioDriverBackend.h )
endif( )
set( DirFiles_SourceGroup "${RelativeSourceGroup}" )
......
......@@ -334,7 +334,7 @@ void CVAAmbisonicsFreeFieldAudioRenderer::Reset()
VA_VERBOSE( "AmbisonicsFreeFieldAudioRenderer", "Received reset call, indicating reset now" );
ctxAudio.m_iResetFlag = 1; // Request reset
if( ctxAudio.m_iStatus == 0 )
if( ctxAudio.m_iStatus == 0 || m_oParams.bOfflineRendering )
{
VA_VERBOSE( "AmbisonicsFreeFieldAudioRenderer", "Was not streaming, will reset manually" );
// if no streaming active, reset manually
......
......@@ -410,7 +410,7 @@ void CVABinauralAirTrafficNoiseAudioRenderer::Reset()
{
ctxAudio.m_iResetFlag = 1; // Request reset
if( ctxAudio.m_iStatus == 0 )
if( ctxAudio.m_iStatus == 0 || m_oParams.bOfflineRendering )
{
// if no streaming active, reset manually
//SyncInternalData();
......
......@@ -491,7 +491,7 @@ void CVABinauralArtificialReverbAudioRenderer::Reset()
{
ctxAudio.m_iResetFlag = 1; // Request reset
if( ctxAudio.m_iStatus == 0 )
if( ctxAudio.m_iStatus == 0 || m_oParams.bOfflineRendering )
{
// if no streaming active, reset manually
ResetInternalData();
......
......@@ -188,19 +188,20 @@ private:
friend class CVABFFSoundPathFactory;
};
class CVABFFSoundPathFactory : public IVAPoolObjectFactory {
class CVABFFSoundPathFactory : public IVAPoolObjectFactory
{
public:
CVABFFSoundPathFactory( double dSamplerate, int iBlocklength, int iHRIRFilterLength, int iDirFilterLength )
: m_dSamplerate( dSamplerate )
, m_iBlocklength( iBlocklength )
, m_iHRIRFilterLength( iHRIRFilterLength )
, m_iDirFilterLength( iDirFilterLength )
{}
{};
CVAPoolObject* CreatePoolObject()
{
return new CVABFFSoundPath( m_dSamplerate, m_iBlocklength, m_iHRIRFilterLength, m_iDirFilterLength );
}
};
private:
double m_dSamplerate; //!< Abtastrate
......@@ -362,7 +363,7 @@ void CVABinauralFreeFieldAudioRenderer::Reset()
VA_VERBOSE( "BinauralFreeFieldAudioRenderer", "Received reset call, indicating reset now" );
ctxAudio.m_iResetFlag = 1; // Request reset
if( ctxAudio.m_iStatus == 0 )
if( ctxAudio.m_iStatus == 0 || m_oParams.bOfflineRendering )
{
VA_VERBOSE( "BinauralFreeFieldAudioRenderer", "Was not streaming, will reset manually" );
// if no streaming active, reset manually
......@@ -1391,6 +1392,17 @@ CVAStruct CVABinauralFreeFieldAudioRenderer::CallObject( const CVAStruct& oArgs
VA_EXCEPT2( INVALID_PARAMETER, "Invalid command (\"" + sCommandOrg + "\")" );
}
void CVABinauralFreeFieldAudioRenderer::SetParameters( const CVAStruct& oParams )
{
// Only delegate
CallObject( oParams );
}
CVAStruct CVABinauralFreeFieldAudioRenderer::GetParameters( const CVAStruct& )
{
return CVAStruct( *m_oParams.pConfig );
}
void CVABinauralFreeFieldAudioRenderer::onStartDumpListeners( const std::string& sFilenameFormat )
{
if( m_bDumpListeners )
......
......@@ -118,6 +118,8 @@ public:
// --= Module interface =--
CVAStruct CallObject( const CVAStruct& oArgs );
void SetParameters( const CVAStruct& oParams );
CVAStruct GetParameters( const CVAStruct& );
void onStartDumpListeners( const std::string& sFilenameFormat );
void onStopDumpListeners();
......
......@@ -370,7 +370,7 @@ void CVAPrototypeFreeFieldAudioRenderer::Reset()
VA_VERBOSE( "PrototypeFreeFieldAudioRenderer", "Received reset call, indicating reset now" );
ctxAudio.m_iResetFlag = 1; // Request reset
if( ctxAudio.m_iStatus == 0 )
if( ctxAudio.m_iStatus == 0 || m_oParams.bOfflineRendering )
{
VA_VERBOSE( "PrototypeFreeFieldAudioRenderer", "Was not streaming, will reset manually" );
// if no streaming active, reset manually
......
......@@ -29,6 +29,7 @@
#include <ITAUPFilterPool.h>
#include <ITAAtomicPrimitives.h>
#include <ITADataSourceRealization.h>
#include <ITAVariableDelayLine.h>
// Vista includes
#include <VistaInterProcComm/Concurrency/VistaThreadEvent.h>
......@@ -50,13 +51,18 @@ public:
CVAPTGenericPathAudioRenderer::CVAPTGPListener* pListener;
ITAAtomicBool bDelete;
CITAVariableDelayLine* pVariableDelayLine;
std::vector< ITAUPConvolution* > vpFIRConvolver; // N-channel convolver
inline void PreRequest()
{
pSource = nullptr;
pListener = nullptr;
for( size_t n=0; n < vpFIRConvolver.size(); n++ )
vpFIRConvolver[n]->clear();
pVariableDelayLine->Clear();
for( size_t n = 0; n < vpFIRConvolver.size(); n++ )
vpFIRConvolver[ n ]->clear();
};
private:
......@@ -131,11 +137,14 @@ CVAPTGenericSoundPath::CVAPTGenericSoundPath( double dSamplerate, int iBlockleng
if( iNumChannels < 1 )
ITA_EXCEPT1( INVALID_PARAMETER, "Number of channels must be positive" );
for( int n=0; n<iNumChannels; n++ )
const int iAlgorithm = CITAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
pVariableDelayLine = new CITAVariableDelayLine( dSamplerate, iBlocklength, 6 * dSamplerate, iAlgorithm );
for( int n = 0; n < iNumChannels; n++ )
{
ITAUPConvolution* pFIRConvolver = new ITAUPConvolution( iBlocklength, iIRFilterLength );
pFIRConvolver->SetFilterExchangeMode( ITAUPConvolution::CROSSFADE_COSINE_SQUARE );
pFIRConvolver->SetFilterCrossfadeLength( (std::min)( iBlocklength, 32 ) );
pFIRConvolver->SetFilterCrossfadeLength( ( std::min )( iBlocklength, 32 ) );
pFIRConvolver->SetGain( 1.0f, true );
ITAUPFilter* pHRIRFilterChL = pFIRConvolver->RequestFilter();
pHRIRFilterChL->Zeros();
......@@ -148,19 +157,21 @@ CVAPTGenericSoundPath::CVAPTGenericSoundPath( double dSamplerate, int iBlockleng
CVAPTGenericSoundPath::~CVAPTGenericSoundPath()
{
for( size_t n=0; n<vpFIRConvolver.size(); n++ )
delete vpFIRConvolver[n];
delete pVariableDelayLine;
for( size_t n = 0; n < vpFIRConvolver.size(); n++ )
delete vpFIRConvolver[ n ];
}
// Renderer
CVAPTGenericPathAudioRenderer::CVAPTGenericPathAudioRenderer( const CVAAudioRendererInitParams& oParams )
: m_pCore( oParams.pCore )
, m_pCurSceneState( nullptr )
, m_iIRFilterLengthSamples( -1 )
, m_iNumChannels( -1 )
, m_oParams( oParams )
: m_pCore( oParams.pCore )
, m_pCurSceneState( nullptr )
, m_iIRFilterLengthSamples( -1 )
, m_iNumChannels( -1 )
, m_oParams( oParams )
{
// read config
Init( *oParams.pConfig );
......@@ -184,6 +195,8 @@ CVAPTGenericPathAudioRenderer::CVAPTGenericPathAudioRenderer( const CVAAudioRend
ctxAudio.m_iStatus = 0; // Stopped
m_iCurGlobalAuralizationMode = IVAInterface::VA_AURAMODE_DEFAULT;
m_sfTempBuffer.Init( oParams.pCore->GetCoreConfig()->oAudioDriverConfig.iBuffersize, true );
}
CVAPTGenericPathAudioRenderer::~CVAPTGenericPathAudioRenderer()
......@@ -200,15 +213,9 @@ void CVAPTGenericPathAudioRenderer::Init( const CVAStruct& oArgs )
conf.OptInteger( "IRFilterLengthSamples", m_iIRFilterLengthSamples, 1024 );
conf.OptInteger( "FilterDelaySamples", m_iFilterDelaySamples, 0 );
if( m_iIRFilterLengthSamples < 0 )
ITA_EXCEPT1( INVALID_PARAMETER, "IR filter size must be positive" );
if( m_iFilterDelaySamples >= m_iIRFilterLengthSamples )
ITA_EXCEPT1( INVALID_PARAMETER, "IR filter delay samples must be smaller than IR filter length" );
conf.OptBool( "OutputMonitoring", m_bOutputMonitoring, false );
return;
......@@ -218,7 +225,7 @@ void CVAPTGenericPathAudioRenderer::Reset()
{
ctxAudio.m_iResetFlag = 1; // Request reset
if( ctxAudio.m_iStatus == 0 )
if( ctxAudio.m_iStatus == 0 || m_oParams.bOfflineRendering )
{
// if no streaming active, reset manually
//SyncInternalData();
......@@ -403,12 +410,12 @@ void CVAPTGenericPathAudioRenderer::ManageSoundPaths( const CVASceneState* pCurS
while( citr != pDiff->viNewReceiverIDs.end() )
{
int iListenerID = ( *citr++ );
CVAPTGPListener* pListener = m_mListeners[iListenerID];
CVAPTGPListener* pListener = m_mListeners[ iListenerID ];
for( size_t i=0; i<pDiff->viComSoundSourceIDs.size(); i++ )
for( size_t i = 0; i < pDiff->viComSoundSourceIDs.size(); i++ )
{
int iSourceID = pDiff->viComSoundSourceIDs[i];
CVAPTGPSource* pSource = m_mSources[iSourceID];
int iSourceID = pDiff->viComSoundSourceIDs[ i ];
CVAPTGPSource* pSource = m_mSources[ iSourceID ];
if( !pSource->bDeleted ) // only, if not marked for deletion
CVAPTGenericSoundPath* pPath = CreateSoundPath( pSource, pListener );
}
......@@ -419,12 +426,12 @@ void CVAPTGenericPathAudioRenderer::ManageSoundPaths( const CVASceneState* pCurS
while( cits != pDiff->viNewSoundSourceIDs.end() )
{
const int& iSourceID( *cits++ );
CVAPTGPSource* pSource = m_mSources[iSourceID];
CVAPTGPSource* pSource = m_mSources[ iSourceID ];
for( size_t i=0; i<pDiff->viComReceiverIDs.size(); i++ )
for( size_t i = 0; i < pDiff->viComReceiverIDs.size(); i++ )
{
int iListenerID = pDiff->viComReceiverIDs[i];
CVAPTGPListener* pListener = m_mListeners[iListenerID];
int iListenerID = pDiff->viComReceiverIDs[ i ];
CVAPTGPListener* pListener = m_mListeners[ iListenerID ];
if( !pListener->bDeleted )
CVAPTGenericSoundPath* pPath = CreateSoundPath( pSource, pListener );
}
......@@ -435,13 +442,13 @@ void CVAPTGenericPathAudioRenderer::ManageSoundPaths( const CVASceneState* pCurS
while( cits != pDiff->viNewSoundSourceIDs.end() )
{
const int& iSourceID( *cits++ );
CVAPTGPSource* pSource = m_mSources[iSourceID];
CVAPTGPSource* pSource = m_mSources[ iSourceID ];
citr = pDiff->viNewReceiverIDs.begin();
while( citr != pDiff->viNewReceiverIDs.end() )
{
const int& iListenerID( *citr++ );
CVAPTGPListener* pListener = m_mListeners[iListenerID];
CVAPTGPListener* pListener = m_mListeners[ iListenerID ];
CVAPTGenericSoundPath* pPath = CreateSoundPath( pSource, pListener );
}
}
......@@ -456,9 +463,9 @@ CVAPTGenericSoundPath* CVAPTGenericPathAudioRenderer::CreateSoundPath( CVAPTGPSo
assert( !pSource->bDeleted && !pListener->bDeleted );
VA_VERBOSE( "PTGenericPathAudioRenderer", "Creating sound path from source " << iSourceID << " -> sound receiver " << iListenerID);
VA_VERBOSE( "PTGenericPathAudioRenderer", "Creating sound path from source " << iSourceID << " -> sound receiver " << iListenerID );
CVAPTGenericSoundPath* pPath = dynamic_cast<CVAPTGenericSoundPath*>( m_pSoundPathPool->RequestObject() );
CVAPTGenericSoundPath* pPath = dynamic_cast< CVAPTGenericSoundPath* >( m_pSoundPathPool->RequestObject() );
pPath->pSource = pSource;
pPath->pListener = pListener;
......@@ -473,7 +480,7 @@ CVAPTGenericSoundPath* CVAPTGenericPathAudioRenderer::CreateSoundPath( CVAPTGPSo
void CVAPTGenericPathAudioRenderer::DeleteSoundPath( CVAPTGenericSoundPath* pPath )
{
VA_VERBOSE( "PTGenericPathAudioRenderer", "Marking sound path from source " << pPath->pSource->pData->iID << " -> sound receiver " << pPath->pListener->pData->iID << " for deletion");
VA_VERBOSE( "PTGenericPathAudioRenderer", "Marking sound path from source " << pPath->pSource->pData->iID << " -> sound receiver " << pPath->pListener->pData->iID << " for deletion" );
pPath->bDelete = true;
pPath->RemoveReference();
......@@ -523,7 +530,7 @@ CVAPTGenericPathAudioRenderer::CVAPTGPSource* CVAPTGenericPathAudioRenderer::Cre
VA_VERBOSE( "PTGenericPathAudioRenderer", "Creating source with ID " << iID );
CVAPTGPSource* pSource = dynamic_cast< CVAPTGPSource* >( m_pSourcePool->RequestObject() );
pSource->pData = m_pCore->GetSceneManager()->GetSoundSourceDesc(iID);
pSource->pData = m_pCore->GetSceneManager()->GetSoundSourceDesc( iID );
pSource->pData->AddReference();
pSource->bDeleted = false;
......@@ -623,8 +630,8 @@ void CVAPTGenericPathAudioRenderer::ResetInternalData()
}
ctxAudio.m_lSoundPaths.clear();
std::list< CVAPTGPListener* >::const_iterator itl=ctxAudio.m_lListener.begin();
while( itl !=ctxAudio.m_lListener.end() )
std::list< CVAPTGPListener* >::const_iterator itl = ctxAudio.m_lListener.begin();