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

WIP

parent 22757c5b
......@@ -137,6 +137,9 @@ void CVACoreConfig::Init( const CVAStruct& oData )
conf.OptNumber( "Calibration/DefaultMinimumDistance", dDefaultMinimumDistance, 0.25f ); // translates +12 dB SPL
conf.OptNumber( "Calibration/DefaultDistance", dDefaultDistance, 2.0f ); // translates to -6 dB SPL
conf.OptBool( "RemoteShutdownAllowed", bRemoteShutdownAllowed, true );
}
const CVAStruct& CVACoreConfig::GetStruct() const
......
......@@ -52,6 +52,8 @@ public:
double dDefaultDistance; //!< Definse the default distance when spherical spreading is deactivated (auralization mode)
double dDefaultMinimumDistance; //!< Defines the minimum distance that should be kept from a sound source (point source can get infinitely loud)
bool bRemoteShutdownAllowed; //!< Flag for accepting or rejecting client remote shutdown via module call (non-networked finalize still works)
//! Initialize the configuration with a struct
/**
* \note: Errors are forwarded as exceptions, see \CVAException
......
......@@ -5161,6 +5161,21 @@ CVAStruct CVACoreImpl::CallObject( const CVAStruct& oArgs )
oReturn = oArgs[ "structrebound" ];
}
if( oArgs.HasKey( "shutdown" ) || oArgs.HasKey( "finalize" ) || oArgs.HasKey( "stop" ) )
{
VA_WARN( "Core", "Received shutdown request" );
if( GetCoreConfig()->bRemoteShutdownAllowed )
{
VA_TRACE( "Core", "Accepting remote shutdown request, will finalize now" );
Finalize();
VA_TRACE( "Core", "Shutdown performed" );
}
else
{
VA_WARN( "Core", "Shutdown request denied, the core configuration does not accept a remote shutdown" );
}
}
VA_VERBOSE( "Core", "Core module will transmit answer now" );
return oReturn;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment