Commit df0e324e authored by Pascal Palenda's avatar Pascal Palenda

Adapt to ITASimulationScheduler changes

parent e306115e
......@@ -1102,7 +1102,7 @@ void ComplexSoundPath::ExportRIR( const std::string& sFileName, const bool bDS/*
// --= Klasse CVARoomAcousticsResult =--
class CVARoomAcousticsResult : public CRavenSimulationResult
class CVARoomAcousticsResult : public ITASimulationScheduler::CSimulationResult
{
public:
CVARoomAcousticsResult() : pPath( nullptr ) {};
......@@ -1182,23 +1182,23 @@ CVARoomAcousticsAudioRenderer::CVARoomAcousticsAudioRenderer( const CVAAudioRend
if( m_iSetup == SETUP_LOCAL )
{
CRavenLocalScheduler::CConfiguration oConf;
ITASimulationScheduler::CLocalScheduler::CConfiguration oConf;
oConf.sRavenDataBasePath = sRavenDataBasePath;
std::string sTaskProcessing;
conf.OptString( "TaskProcessing", sTaskProcessing, "Timeout" );
int iTaskProcessingMode = -1;
if( toUppercase( sTaskProcessing ) == "TIMEOUT" )
iTaskProcessingMode = CRavenLocalScheduler::CConfiguration::CThreadConfiguration::TIMEOUT;
iTaskProcessingMode = ITASimulationScheduler::CLocalScheduler::CConfiguration::CThreadConfiguration::TIMEOUT;
else if( toUppercase( sTaskProcessing ) == "EVENTSYNC" )
iTaskProcessingMode = CRavenLocalScheduler::CConfiguration::CThreadConfiguration::EVENTSYNC;
iTaskProcessingMode = ITASimulationScheduler::CLocalScheduler::CConfiguration::CThreadConfiguration::EVENTSYNC;
else if( toUppercase( sTaskProcessing ) == "CONTINUOUS" )
iTaskProcessingMode = CRavenLocalScheduler::CConfiguration::CThreadConfiguration::CONTINUOUS;
iTaskProcessingMode = ITASimulationScheduler::CLocalScheduler::CConfiguration::CThreadConfiguration::CONTINUOUS;
else
ITA_EXCEPT1( INVALID_PARAMETER, "Unrecognized task processing mode" );
CRavenLocalScheduler::CConfiguration::CThreadConfiguration oThreadConf;
ITASimulationScheduler::CLocalScheduler::CConfiguration::CThreadConfiguration oThreadConf;
oThreadConf.iPriority = 0;
oThreadConf.iTaskProcessingMode = iTaskProcessingMode;
oThreadConf.sRavenDataBasePath = sRavenDataBasePath;
......@@ -1206,17 +1206,17 @@ CVARoomAcousticsAudioRenderer::CVARoomAcousticsAudioRenderer( const CVAAudioRend
double dTemp;
conf.OptNumber( "UpdateRateDS", dTemp, 123.0f );
oThreadConf.fUpdateRate = float( dTemp );
oThreadConf.iFieldOfDuty = CRavenSimulationTask::SIM_DS;
oThreadConf.iFieldOfDuty = ITASimulationScheduler::CSimulationTask::SIM_DS;
oConf.voThreads.push_back( oThreadConf );
conf.OptNumber( "UpdateRateER", dTemp, 42.5f );
oThreadConf.fUpdateRate = float( dTemp );
oThreadConf.iFieldOfDuty = CRavenSimulationTask::SIM_ER_IS;
oThreadConf.iFieldOfDuty = ITASimulationScheduler::CSimulationTask::SIM_ER_IS;
oConf.voThreads.push_back( oThreadConf );
conf.OptNumber( "UpdateRateDD", dTemp, 1.5f );
oThreadConf.fUpdateRate = float( dTemp );
oThreadConf.iFieldOfDuty = CRavenSimulationTask::SIM_DD_RT;
oThreadConf.iFieldOfDuty = ITASimulationScheduler::CSimulationTask::SIM_DD_RT;
oConf.voThreads.push_back( oThreadConf );
//pCore->SetProgress( "Setting up Room Acoustics Audio Renderer", "Creating RAVEN local scheduler", 6 );
......@@ -1247,7 +1247,7 @@ CVARoomAcousticsAudioRenderer::CVARoomAcousticsAudioRenderer( const CVAAudioRend
for( int i = 0; i < ( int ) vsLocalFOD.size(); i++ )
{
const std::string& s( vsLocalFOD[ i ] );
int iSimType = ParseSimulationType( s );
int iSimType = ITASimulationScheduler::ParseSimulationType( s );
if( iSimType == -1 )
VA_EXCEPT2( INVALID_PARAMETER, "Could not parse simulation type '" + s + "'" );
viLocalFoD.push_back( iSimType );
......@@ -1263,7 +1263,7 @@ CVARoomAcousticsAudioRenderer::CVARoomAcousticsAudioRenderer( const CVAAudioRend
for( int i = 0; i < ( int ) vsRemoteFOD.size(); i++ )
{
const std::string& s( vsRemoteFOD[ i ] );
int iSimType = ParseSimulationType( s );
int iSimType = ITASimulationScheduler::ParseSimulationType( s );
if( iSimType > 0 )
viRemoteFoD.push_back( iSimType );
}
......@@ -1618,8 +1618,8 @@ void CVARoomAcousticsAudioRenderer::ProcessStream( const ITAStreamInfo* pStreamI
double fBudget = m_pCore->GetCoreConfig()->oAudioDriverConfig.iBuffersize / m_pCore->GetCoreConfig()->oAudioDriverConfig.dSampleRate;
// States erstellen
CRavenReceiverState oGenericReceiverState;
CRavenSourceState oGenericSourceState;
ITASimulationScheduler::RAVEN::CReceiverState oGenericReceiverState;
ITASimulationScheduler::RAVEN::CSourceState oGenericSourceState;
for( std::list< ComplexSoundPath* >::iterator it = ctxAudio.m_lComplexSoundPathsInternal.begin(); it != ctxAudio.m_lComplexSoundPathsInternal.end(); ++it )
{
......@@ -1676,81 +1676,81 @@ void CVARoomAcousticsAudioRenderer::ProcessStream( const ITAStreamInfo* pStreamI
// Raven config
int iComp = 0;
iComp = pTaskDS->oConfig.Compare( m_oRavenConfig );
if( iComp & CRavenConfig::GEO_SCENE )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::GEO_SCENE )
pTaskDS->oConfig.oGeometry.sSceneFileName = m_oRavenConfig.oGeometry.sSceneFileName;
/*
if( iComp & CRavenConfig::ROOM_HUMIDITY )
if( iComp & CConfig::ROOM_HUMIDITY )
pTaskDS->oConfig.oRoom.fHumidity = m_oConfig.oRoom.fHumidity;
if( iComp & CRavenConfig::ROOM_STATPRESSURE )
if( iComp & CConfig::ROOM_STATPRESSURE )
pTaskDS->oConfig.oRoom.fStaticPressure = m_oConfig.oRoom.fStaticPressure;
if( iComp & CRavenConfig::ROOM_TEMPERATUR )
if( iComp & CConfig::ROOM_TEMPERATUR )
pTaskDS->oConfig.oRoom.fTemperature = m_oConfig.oRoom.fTemperature;
if( iComp & CRavenConfig::SIMSETS_SAMPLERATE )
if( iComp & CConfig::SIMSETS_SAMPLERATE )
pTaskDS->oConfig.oSimulationSettings.dSampleRate = m_oConfig.oSimulationSettings.dSampleRate;
*/
if( iComp & CRavenConfig::SIMSETS_ACCELETYPE )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::SIMSETS_ACCELETYPE )
pTaskDS->oConfig.oSimulationSettings.iAccelerationType = m_oRavenConfig.oSimulationSettings.iAccelerationType;
/*
if( iComp & CRavenConfig::FILTENG_MAGRES)
if( iComp & CConfig::FILTENG_MAGRES)
pTaskDS->oConfig.oFilterEngine.iMagnitudesResolution = m_oConfig.oFilterEngine.iMagnitudesResolution;
*/
iComp = pTaskIS->oConfig.Compare( m_oRavenConfig );
if( iComp & CRavenConfig::GEO_SCENE )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::GEO_SCENE )
pTaskIS->oConfig.oGeometry.sSceneFileName = m_oRavenConfig.oGeometry.sSceneFileName;
if( iComp & CRavenConfig::ROOM_HUMIDITY )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::ROOM_HUMIDITY )
pTaskIS->oConfig.oRoom.fHumidity = m_oRavenConfig.oRoom.fHumidity;
if( iComp & CRavenConfig::ROOM_STATPRESSURE )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::ROOM_STATPRESSURE )
pTaskIS->oConfig.oRoom.fStaticPressure = m_oRavenConfig.oRoom.fStaticPressure;
if( iComp & CRavenConfig::ROOM_TEMPERATUR )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::ROOM_TEMPERATUR )
pTaskIS->oConfig.oRoom.fTemperature = m_oRavenConfig.oRoom.fTemperature;
if( iComp & CRavenConfig::SIMSETS_SAMPLERATE )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::SIMSETS_SAMPLERATE )
pTaskIS->oConfig.oSimulationSettings.dSampleRate = m_oRavenConfig.oSimulationSettings.dSampleRate;
if( iComp & CRavenConfig::SIMSETS_ACCELETYPE )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::SIMSETS_ACCELETYPE )
pTaskIS->oConfig.oSimulationSettings.iAccelerationType = m_oRavenConfig.oSimulationSettings.iAccelerationType;
if( iComp & CRavenConfig::FILTENG_MAGRES )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::FILTENG_MAGRES )
pTaskIS->oConfig.oFilterEngine.iMagnitudesResolution = m_oRavenConfig.oFilterEngine.iMagnitudesResolution;
if( iComp & CRavenConfig::IS_ORDER_PS )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::IS_ORDER_PS )
pTaskIS->oConfig.oImageSource.iOrderPrimarySource = m_oRavenConfig.oImageSource.iOrderPrimarySource;
if( iComp & CRavenConfig::IS_ORDER_SS )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::IS_ORDER_SS )
pTaskIS->oConfig.oImageSource.iOrderSecondarySource = m_oRavenConfig.oImageSource.iOrderSecondarySource;
iComp = pTaskRT->oConfig.Compare( m_oRavenConfig );
if( iComp & CRavenConfig::GEO_SCENE )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::GEO_SCENE )
pTaskRT->oConfig.oGeometry.sSceneFileName = m_oRavenConfig.oGeometry.sSceneFileName;
if( iComp & CRavenConfig::ROOM_HUMIDITY )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::ROOM_HUMIDITY )
pTaskRT->oConfig.oRoom.fHumidity = m_oRavenConfig.oRoom.fHumidity;
if( iComp & CRavenConfig::ROOM_STATPRESSURE )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::ROOM_STATPRESSURE )
pTaskRT->oConfig.oRoom.fStaticPressure = m_oRavenConfig.oRoom.fStaticPressure;
if( iComp & CRavenConfig::ROOM_TEMPERATUR )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::ROOM_TEMPERATUR )
pTaskRT->oConfig.oRoom.fTemperature = m_oRavenConfig.oRoom.fTemperature;
if( iComp & CRavenConfig::SIMSETS_SAMPLERATE )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::SIMSETS_SAMPLERATE )
pTaskRT->oConfig.oSimulationSettings.dSampleRate = m_oRavenConfig.oSimulationSettings.dSampleRate;
if( iComp & CRavenConfig::SIMSETS_ACCELETYPE )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::SIMSETS_ACCELETYPE )
pTaskRT->oConfig.oSimulationSettings.iAccelerationType = m_oRavenConfig.oSimulationSettings.iAccelerationType;
if( iComp & CRavenConfig::FILTENG_MAGRES )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::FILTENG_MAGRES )
pTaskRT->oConfig.oFilterEngine.iMagnitudesResolution = m_oRavenConfig.oFilterEngine.iMagnitudesResolution;
if( iComp & CRavenConfig::RT_PORTDETECT_ELTHRESH )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::RT_PORTDETECT_ELTHRESH )
pTaskRT->oConfig.oRayTracer.oPortalDetector.fEnergyLossThreshold = m_oRavenConfig.oRayTracer.oPortalDetector.fEnergyLossThreshold;
if( iComp & CRavenConfig::RT_PORTDETECT_FILTERLENGTH )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::RT_PORTDETECT_FILTERLENGTH )
pTaskRT->oConfig.oRayTracer.oPortalDetector.fFilterLength = m_oRavenConfig.oRayTracer.oPortalDetector.fFilterLength;
if( iComp & CRavenConfig::RT_PORTDETECT_NUMPARTICLES )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::RT_PORTDETECT_NUMPARTICLES )
pTaskRT->oConfig.oRayTracer.oPortalDetector.uliNumParticles = m_oRavenConfig.oRayTracer.oPortalDetector.uliNumParticles;
if( iComp & CRavenConfig::RT_PORTDETECT_RESTIMESLOTS )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::RT_PORTDETECT_RESTIMESLOTS )
pTaskRT->oConfig.oRayTracer.oPortalDetector.fResolutionTimeSlots = m_oRavenConfig.oRayTracer.oPortalDetector.fResolutionTimeSlots;
if( iComp & CRavenConfig::RT_PORTDETECT_ELTHRESH )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::RT_PORTDETECT_ELTHRESH )
pTaskRT->oConfig.oRayTracer.oSphereDetector.fEnergyLossThreshold = m_oRavenConfig.oRayTracer.oSphereDetector.fEnergyLossThreshold;
if( iComp & CRavenConfig::RT_PORTDETECT_FILTERLENGTH )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::RT_PORTDETECT_FILTERLENGTH )
pTaskRT->oConfig.oRayTracer.oSphereDetector.fFilterLength = m_oRavenConfig.oRayTracer.oSphereDetector.fFilterLength;
if( iComp & CRavenConfig::RT_PORTDETECT_NUMPARTICLES )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::RT_PORTDETECT_NUMPARTICLES )
pTaskRT->oConfig.oRayTracer.oSphereDetector.uliNumParticles = m_oRavenConfig.oRayTracer.oSphereDetector.uliNumParticles;
if( iComp & CRavenConfig::RT_PORTDETECT_RESTIMESLOTS )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::RT_PORTDETECT_RESTIMESLOTS )
pTaskRT->oConfig.oRayTracer.oSphereDetector.fResolutionTimeSlots = m_oRavenConfig.oRayTracer.oSphereDetector.fResolutionTimeSlots;
if( iComp & CRavenConfig::RT_SPHEREDETECT_RADIUS )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::RT_SPHEREDETECT_RADIUS )
pTaskRT->oConfig.oRayTracer.oSphereDetector.fRadius = m_oRavenConfig.oRayTracer.oSphereDetector.fRadius;
if( iComp & CRavenConfig::RT_SPHEREDETECT_RESAZI )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::RT_SPHEREDETECT_RESAZI )
pTaskRT->oConfig.oRayTracer.oSphereDetector.fResolutionAzimuth = m_oRavenConfig.oRayTracer.oSphereDetector.fResolutionAzimuth;
if( iComp & CRavenConfig::RT_SPHEREDETECT_RESELE )
if( iComp & ITASimulationScheduler::RAVEN::CConfig::RT_SPHEREDETECT_RESELE )
pTaskRT->oConfig.oRayTracer.oSphereDetector.fResolutionElevation = m_oRavenConfig.oRayTracer.oSphereDetector.fResolutionElevation;
// Scene
......@@ -1768,12 +1768,12 @@ void CVARoomAcousticsAudioRenderer::ProcessStream( const ITAStreamInfo* pStreamI
pTaskIS->oScene.SetSourceState( 0, oGenericSourceState );
pTaskRT->oScene.SetSourceState( 0, oGenericSourceState );
if( pTaskDS->iSimulationType != CRavenSimulationTask::SIM_DS )
pTaskDS->iSimulationType = CRavenSimulationTask::SIM_DS;
if( pTaskIS->iSimulationType != CRavenSimulationTask::SIM_ER_IS )
pTaskIS->iSimulationType = CRavenSimulationTask::SIM_ER_IS;
if( pTaskRT->iSimulationType != CRavenSimulationTask::SIM_DD_RT )
pTaskRT->iSimulationType = CRavenSimulationTask::SIM_DD_RT;
if( pTaskDS->iSimulationType != ITASimulationScheduler::CSimulationTask::SIM_DS )
pTaskDS->iSimulationType = ITASimulationScheduler::CSimulationTask::SIM_DS;
if( pTaskIS->iSimulationType != ITASimulationScheduler::CSimulationTask::SIM_ER_IS )
pTaskIS->iSimulationType = ITASimulationScheduler::CSimulationTask::SIM_ER_IS;
if( pTaskRT->iSimulationType != ITASimulationScheduler::CSimulationTask::SIM_DD_RT )
pTaskRT->iSimulationType = ITASimulationScheduler::CSimulationTask::SIM_DD_RT;
pPath->oProfiler.dLastTaskAssign = pPath->oProfiler.swTaskAssign.stop();
......@@ -2124,15 +2124,15 @@ void CVARoomAcousticsAudioRenderer::LoadScene( const std::string& sFileName )
m_oRavenConfig.oGeometry.sSceneFileName = sFileName;
}
int CVARoomAcousticsAudioRenderer::PreTaskStart( IRavenSimulationSchedulerInterface*, CRavenSimulationTask* )
int CVARoomAcousticsAudioRenderer::PreTaskStart(ITASimulationScheduler::ISimulationSchedulerInterface*, ITASimulationScheduler::CSimulationTask* )
{
return CRavenSimulationSchedulerTaskHandler::COMPUTE_TASK;
return CSimulationSchedulerTaskHandler::COMPUTE_TASK;
}
int CVARoomAcousticsAudioRenderer::PostTaskFinished( IRavenSimulationSchedulerInterface* pScheduler, const CRavenSimulationTask* pTask, CRavenSimulationResult* pSimulationResult )
int CVARoomAcousticsAudioRenderer::PostTaskFinished(ITASimulationScheduler::ISimulationSchedulerInterface* pScheduler, const ITASimulationScheduler::CSimulationTask* pTask, ITASimulationScheduler::CSimulationResult* pSimulationResult )
{
assert( pSimulationResult->vcspResult.size() == 1 ); // Exactly one result expected
CRavenSimulationResult::ComplexSimulationSoundPath* pResultSimulationPath = pSimulationResult->vcspResult[ 0 ];
ITASimulationScheduler::CSimulationResult::ComplexSimulationSoundPath* pResultSimulationPath = pSimulationResult->vcspResult[ 0 ];
const ITASampleFrame* psfResult = pResultSimulationPath->psfResult;
int iLeadingZeros = pResultSimulationPath->iLeadingZeros;
bool bDirectSoundAudible = pResultSimulationPath->bDirectSoundAudible;
......@@ -2149,7 +2149,7 @@ int CVARoomAcousticsAudioRenderer::PostTaskFinished( IRavenSimulationSchedulerIn
pCurrentPath->oProfiler.uiFinishedTasks++;
m_swUpdateFilter.start();
if( pTask->iSimulationType == CRavenSimulationTask::SIM_DS )
if( pTask->iSimulationType == ITASimulationScheduler::CSimulationTask::SIM_DS )
{
pCurrentPath->UpdateDirectSound( bDirectSoundAudible );
......@@ -2159,10 +2159,10 @@ int CVARoomAcousticsAudioRenderer::PostTaskFinished( IRavenSimulationSchedulerIn
pCurrentPath->bEntitiesInSameRoom = bEntitiesInSameRoom;
}
if( pTask->iSimulationType == CRavenSimulationTask::SIM_ER_IS )
if( pTask->iSimulationType == ITASimulationScheduler::CSimulationTask::SIM_ER_IS )
pCurrentPath->UpdateEarlyReflections( iLeadingZeros, psfResult );
if( pTask->iSimulationType == CRavenSimulationTask::SIM_DD_RT )
if( pTask->iSimulationType == ITASimulationScheduler::CSimulationTask::SIM_DD_RT )
pCurrentPath->UpdateDiffuseDecay( iLeadingZeros, psfResult );
// Gesamte RIR erzeugen und in den Falter geben
......@@ -2205,11 +2205,11 @@ int CVARoomAcousticsAudioRenderer::PostTaskFinished( IRavenSimulationSchedulerIn
bDeleteResult = false;
}
int iRet = CRavenSimulationSchedulerTaskHandler::DELETE_TASK;
int iRet = CSimulationSchedulerTaskHandler::DELETE_TASK;
if( bRemoveReference )
{
static_cast< const CVARoomAcousticsSimulationTask* >( pTask )->RemoveReference();
iRet = CRavenSimulationSchedulerTaskHandler::PRESERVE_TASK;
iRet = CSimulationSchedulerTaskHandler::PRESERVE_TASK;
}
// Bei Netzwerkbertragung muss das Resultat gelscht werden (da eine Kopie zurck kommt)
......@@ -2218,7 +2218,7 @@ int CVARoomAcousticsAudioRenderer::PostTaskFinished( IRavenSimulationSchedulerIn
return iRet;
}
int CVARoomAcousticsAudioRenderer::PostTaskDiscarded( IRavenSimulationSchedulerInterface* pScheduler, const CRavenSimulationTask* pTask )
int CVARoomAcousticsAudioRenderer::PostTaskDiscarded(ITASimulationScheduler::ISimulationSchedulerInterface* pScheduler, const ITASimulationScheduler::CSimulationTask* pTask )
{
// Check if path still existent in current sound pathes
for( std::list< ComplexSoundPath* >::iterator it = m_lComplexSoundPaths.begin();
......@@ -2236,11 +2236,11 @@ int CVARoomAcousticsAudioRenderer::PostTaskDiscarded( IRavenSimulationSchedulerI
if( pPoolTask != nullptr )
{
pPoolTask->RemoveReference();
return CRavenSimulationSchedulerTaskHandler::PRESERVE_TASK;
return CSimulationSchedulerTaskHandler::PRESERVE_TASK;
}
else
{
return CRavenSimulationSchedulerTaskHandler::DELETE_TASK;
return CSimulationSchedulerTaskHandler::DELETE_TASK;
}
}
......@@ -2649,9 +2649,9 @@ void CVARoomAcousticsAudioRenderer::CallObjectConfigSet( const std::string& sKey
std::string sRawValue = std::string( *pValue );
int iType = -1;
if( toUppercase( sRawValue ) == "BSP" )
iType = CRavenConfig::BSP;
iType = ITASimulationScheduler::RAVEN::CConfig::BSP;
if( toUppercase( sRawValue ) == "HASH" )
iType = CRavenConfig::HASHMAP;
iType = ITASimulationScheduler::RAVEN::CConfig::HASHMAP;
if( iType == -1 )
VA_EXCEPT2( INVALID_PARAMETER, "Invalid value '" + sRawValue + "' for acceleration type, use 'BSP' or 'HASH'" );
m_oRavenConfig.oSimulationSettings.iAccelerationType = iType;
......@@ -2665,8 +2665,8 @@ void CVARoomAcousticsAudioRenderer::CallObjectConfigSet( const std::string& sKey
// Blo keinen Quatsch zulassen
int iVal = -1;
std::string sRawValue = std::string( *pValue );
if( toUppercase( sRawValue ) == "OCTAVE" ) iVal = CRavenConfig::WHOLE_OCTAVE_SPECTRUM;
if( toUppercase( sRawValue ) == "THIRDS" ) iVal = CRavenConfig::THIRD_OCTAVE_SPECTRUM;
if( toUppercase( sRawValue ) == "OCTAVE" ) iVal = ITASimulationScheduler::RAVEN::CConfig::WHOLE_OCTAVE_SPECTRUM;
if( toUppercase( sRawValue ) == "THIRDS" ) iVal = ITASimulationScheduler::RAVEN::CConfig::THIRD_OCTAVE_SPECTRUM;
if( iVal == -1 ) VA_EXCEPT2( INVALID_PARAMETER, "Invalid value '" + sRawValue + "' for magnitudes resolution, use 'OCTAVE' or 'THIRD'" );
m_oRavenConfig.oFilterEngine.iMagnitudesResolution = iVal;
return;
......@@ -2725,14 +2725,14 @@ CVAStruct CVARoomAcousticsAudioRenderer::CallObjectConfigGet( const std::string&
if( sKey == "SimulationSettings:AccelerationType" )
{
std::string sType = "BSP";
if( m_oRavenConfig.oSimulationSettings.iAccelerationType == CRavenConfig::HASHMAP ) sType = "HASH";
if( m_oRavenConfig.oSimulationSettings.iAccelerationType == ITASimulationScheduler::RAVEN::CConfig::HASHMAP ) sType = "HASH";
oRet[ sStaticReturnKey ] = sType;
}
if( sKey == "FilterEngine:MagnitudesResolution" )
{
std::string sType = "OCTAVE";
if( m_oRavenConfig.oFilterEngine.iMagnitudesResolution == CRavenConfig::THIRD_OCTAVE_SPECTRUM )
if( m_oRavenConfig.oFilterEngine.iMagnitudesResolution == ITASimulationScheduler::RAVEN::CConfig::THIRD_OCTAVE_SPECTRUM )
sType = "THIRDS";
oRet[ sStaticReturnKey ] = sType;
}
......
......@@ -38,8 +38,8 @@
#include <string.h>
// Raven includes
#include <ITASimulationScheduler/Raven/R_RavenLocalScheduler.h>
#include <ITASimulationScheduler/Raven/R_RavenUtils.h>
#include <ITASimulationScheduler/LocalScheduler.h>
#include <ITASimulationScheduler/Utils.h>
// 3rdParty includes
#include <tbb/concurrent_queue.h>
......@@ -83,7 +83,7 @@ class Source;
* - Ray Tracing u.A. mit Richtcharakteristik, Laufzeit, Mediumsdmpfung, Wandreflexionen, HRIR
*
*/
class CVARoomAcousticsAudioRenderer : public CRavenSimulationSchedulerTaskHandler, public IVAAudioRenderer, public ITADatasourceRealization, public CVAObject
class CVARoomAcousticsAudioRenderer : public ITASimulationScheduler::CSimulationSchedulerTaskHandler, public IVAAudioRenderer, public ITADatasourceRealization, public CVAObject
{
public:
......@@ -134,7 +134,7 @@ public:
//! Returns the renderers output stream datasource
ITADatasource* GetOutputDatasource();
int PreTaskStart( IRavenSimulationSchedulerInterface*, CRavenSimulationTask* );
int PreTaskStart(ITASimulationScheduler::ISimulationSchedulerInterface*, ITASimulationScheduler::CSimulationTask* );
//! Ein Simulationsergebnis ist da und muss verarbeitet werden
/**
......@@ -145,14 +145,14 @@ public:
* Hierzu wird berprft, zu welchem Simulationsanteil das Resultat gehrt (DS, IS, RT) und
* dann wird die gesamte RIR neu erzeugt und in die Faltungsmaschine bergeben.
*/
int PostTaskFinished( IRavenSimulationSchedulerInterface*, const CRavenSimulationTask*, CRavenSimulationResult* );
int PostTaskFinished(ITASimulationScheduler::ISimulationSchedulerInterface*, const ITASimulationScheduler::CSimulationTask*, ITASimulationScheduler::CSimulationResult* );
//! Ein Task wurde verworfen
/**
* \note Nicht reentrant!
*
*/
int PostTaskDiscarded( IRavenSimulationSchedulerInterface*, const CRavenSimulationTask* );
int PostTaskDiscarded(ITASimulationScheduler::ISimulationSchedulerInterface*, const ITASimulationScheduler::CSimulationTask* );
//!
CVAObjectInfo GetObjectInfo() const;
......@@ -177,7 +177,7 @@ public:
protected:
CRavenConfig m_oRavenConfig; //!< Current configuration of Renderer
ITASimulationScheduler::RAVEN::CConfig m_oRavenConfig; //!< Current configuration of Renderer
private:
......@@ -185,7 +185,7 @@ private:
CVACoreImpl* m_pCore; //!< Pointer to the core
IRavenSimulationSchedulerInterface* m_pVARaven; //!< Scheduler fr Simulationsauftrge (Raven)
ITASimulationScheduler::ISimulationSchedulerInterface* m_pVARaven; //!< Scheduler fr Simulationsauftrge (Raven)
int m_iSetup; //!< Scheduler setup (Local, Remote, Hybrid) see \SetupModes
......
......@@ -19,7 +19,7 @@
#include "VARoomAcousticsScheduler.h"
//! Cluster-Implementierung
class CVAClusterRaven : public IRavenSimulationSchedulerInterface {
class CVAClusterRaven : public ITASimulationScheduler::ISimulationSchedulerInterface {
public:
CVAClusterRaven(IVARoomAcousticsSimulationTaskCreator*);
~CVAClusterRaven();
......
......@@ -40,33 +40,33 @@ CVARavenHybridScheduler::CVARavenHybridScheduler( CVACoreImpl* pCore, const std:
{
pCore->RegisterModule( this );
CRavenLocalScheduler::CConfiguration oConf;
ITASimulationScheduler::CLocalScheduler::CConfiguration oConf;
oConf.sRavenDataBasePath = sRavenDataBasePath;
// TODO: auslassen, was die Configuration hergiebt
CRavenLocalScheduler::CConfiguration::CThreadConfiguration oThreadConf;
ITASimulationScheduler::CLocalScheduler::CConfiguration::CThreadConfiguration oThreadConf;
oThreadConf.iPriority = 0;
oThreadConf.iTaskProcessingMode = CRavenLocalScheduler::CConfiguration::CThreadConfiguration::TIMEOUT;
oThreadConf.iTaskProcessingMode = ITASimulationScheduler::CLocalScheduler::CConfiguration::CThreadConfiguration::TIMEOUT;
oThreadConf.sRavenDataBasePath = sRavenDataBasePath;
oThreadConf.fUpdateRate = 200.0f;
oThreadConf.iFieldOfDuty = CRavenSimulationTask::SIM_DS;
oThreadConf.iFieldOfDuty = ITASimulationScheduler::CSimulationTask::SIM_DS;
oConf.voThreads.push_back( oThreadConf );
oThreadConf.fUpdateRate = 20.0f;
oThreadConf.iFieldOfDuty = CRavenSimulationTask::SIM_ER_IS;
oThreadConf.iFieldOfDuty = ITASimulationScheduler::CSimulationTask::SIM_ER_IS;
oConf.voThreads.push_back( oThreadConf );
oThreadConf.fUpdateRate = 1.0f;
oThreadConf.iFieldOfDuty = CRavenSimulationTask::SIM_DD_RT;
oThreadConf.iFieldOfDuty = ITASimulationScheduler::CSimulationTask::SIM_DD_RT;
oConf.voThreads.push_back( oThreadConf );
m_pLocalScheduler = new CRavenLocalScheduler( oConf );
m_pLocalScheduler = new ITASimulationScheduler::CLocalScheduler( oConf );
m_pRavenNetClient = IRavenNetClient::Create();
m_pRavenNetClient = ITASimulationScheduler::RAVEN::IRavenNetClient::Create();
int e;
if( ( e = m_pRavenNetClient->Initialize( sServerIP ) ) != IRavenNetClient::RAVEN_NO_ERROR )
if( ( e = m_pRavenNetClient->Initialize( sServerIP ) ) != ITASimulationScheduler::RAVEN::IRavenNetClient::RAVEN_NO_ERROR )
{
VA_WARN( "RavenHybridScheduler", "Connection to remote simulation server '" << sServerIP << "' failed with error code " << e );
}
......@@ -77,7 +77,7 @@ CVARavenHybridScheduler::CVARavenHybridScheduler( CVACoreImpl* pCore, const std:
int iAttempts = 0;
while( !m_pRavenNetClient->IsConnected() && iAttempts++ < 8 ) VASleep( 250 );
m_pRavenNetClient->SetExceptionHandlingMode( IRavenNetClient::EXC_CLIENT_THROW );
m_pRavenNetClient->SetExceptionHandlingMode(ITASimulationScheduler::RAVEN::IRavenNetClient::EXC_CLIENT_THROW );
if( m_pRavenNetClient->HasRavenSimulationScheduler() )
m_pRemoteScheduler = m_pRavenNetClient->GetRavenSimulationScheduler();
......@@ -110,7 +110,7 @@ CVAObjectInfo CVARavenHybridScheduler::GetObjectInfo() const {
return oCoreModuleInfo;
}
void CVARavenHybridScheduler::AddTask( CRavenSimulationTask* pTask )
void CVARavenHybridScheduler::AddTask(ITASimulationScheduler::CSimulationTask* pTask )
{
m_qpNewTasks.push( static_cast< CVARoomAcousticsSimulationTask* >( pTask ) );
//pTask->oProfiler.dSchedulerEnqueTime = m_pCore->GetCoreClock();
......@@ -164,7 +164,7 @@ bool CVARavenHybridScheduler::LoopBody()
//pNewTask->oProfiler.dSchedulerHandleTime = m_pCore->GetCoreClock();
// Nur Direktschall
if( pTask->iSimulationType == CRavenSimulationTask::SIM_DS )
if( pTask->iSimulationType == ITASimulationScheduler::CSimulationTask::SIM_DS )
{
// Alle vorherigen Simulationsauftrge des gleichen Pfades und Simulationstyps lschen
FilterAndReplaceTasks( m_lDSTasks, pTask );
......@@ -172,21 +172,21 @@ bool CVARavenHybridScheduler::LoopBody()
}
// Nur Spiegelschallquellen ohne Direktschall
if( pTask->iSimulationType == CRavenSimulationTask::SIM_ER_IS )
if( pTask->iSimulationType == ITASimulationScheduler::CSimulationTask::SIM_ER_IS )
{
FilterAndReplaceTasks( m_lISTasks, pTask );
continue;
}
// Nur diffusen Nachhall (RT)
if( pTask->iSimulationType == CRavenSimulationTask::SIM_DD_RT )
if( pTask->iSimulationType == ITASimulationScheduler::CSimulationTask::SIM_DD_RT )
{
FilterAndReplaceTasks( m_lRTTasks, pTask );
continue;
}
// Nur diffusen Nachhall (AR)
if( pTask->iSimulationType == CRavenSimulationTask::SIM_DD_AR )
if( pTask->iSimulationType == ITASimulationScheduler::CSimulationTask::SIM_DD_AR )
{
FilterAndReplaceTasks( m_lARTasks, pTask );
continue;
......@@ -209,7 +209,7 @@ bool CVARavenHybridScheduler::LoopBody()
for( int i=0; i<(int)m_viLocalFieldOfDuties.size(); i++ )
{
int iFoD = m_viLocalFieldOfDuties[i];
if( iFoD == CRavenSimulationTask::SIM_DS )
if( iFoD == ITASimulationScheduler::CSimulationTask::SIM_DS )
{
m_pLocalScheduler->AddTask( pTask );
bAddedToLocal = true;
......@@ -224,9 +224,9 @@ bool CVARavenHybridScheduler::LoopBody()
for( int i=0; i<(int)m_viRemoteFieldOfDuties.size(); i++ )
{
int iFoD = m_viRemoteFieldOfDuties[i];
if( iFoD == CRavenSimulationTask::SIM_DS )
if( iFoD == ITASimulationScheduler::CSimulationTask::SIM_DS )
{
m_pRemoteScheduler->AddTask( (CRavenSimulationTask*) pTask );
m_pRemoteScheduler->AddTask( (ITASimulationScheduler::CSimulationTask*) pTask );
pTask->RemoveReference();
bAddedToRemote = true;
break;
......@@ -235,7 +235,7 @@ bool CVARavenHybridScheduler::LoopBody()
if( bAddedToRemote == true ) break;
pTask->oProfiler.iDiscardReason = CRavenSimulationTask::CProfiler::UNHANDABLE;
pTask->oProfiler.iDiscardReason = ITASimulationScheduler::CSimulationTask::CProfiler::UNHANDABLE;
ImmediatelyDiscard( pTask );
}
m_lDSTasks.clear();
......@@ -250,7 +250,7 @@ bool CVARavenHybridScheduler::LoopBody()
for( int i=0; i<(int)m_viLocalFieldOfDuties.size(); i++ )
{
int iFoD = m_viLocalFieldOfDuties[i];
if( iFoD == CRavenSimulationTask::SIM_ER_IS )
if( iFoD == ITASimulationScheduler::CSimulationTask::SIM_ER_IS )
{
m_pLocalScheduler->AddTask( pTask );
bAddedToLocal = true;
......@@ -265,9 +265,9 @@ bool CVARavenHybridScheduler::LoopBody()
for( int i=0; i<(int)m_viRemoteFieldOfDuties.size(); i++ )
{
int iFoD = m_viRemoteFieldOfDuties[i];
if( iFoD == CRavenSimulationTask::SIM_ER_IS )
if( iFoD == ITASimulationScheduler::CSimulationTask::SIM_ER_IS )
{
m_pRemoteScheduler->AddTask( (CRavenSimulationTask*) pTask );
m_pRemoteScheduler->AddTask( (ITASimulationScheduler::CSimulationTask*) pTask );
pTask->RemoveReference();
bAddedToRemote = true;
break;
......@@ -276,7 +276,7 @@ bool CVARavenHybridScheduler::LoopBody()
if( bAddedToRemote == true ) break;
pTask->oProfiler.iDiscardReason = CRavenSimulationTask::CProfiler::UNHANDABLE;
pTask->oProfiler.iDiscardReason = ITASimulationScheduler::CSimulationTask::CProfiler::UNHANDABLE;
ImmediatelyDiscard( pTask );
}
m_lISTasks.clear();
......@@ -292,7 +292,7 @@ bool CVARavenHybridScheduler::LoopBody()
for( int i=0; i<(int)m_viLocalFieldOfDuties.size(); i++ )
{