Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
VACore
Commits
b2a60331
Commit
b2a60331
authored
Oct 01, 2018
by
Dipl.-Ing. Jonas Stienen
Browse files
WIP
parent
22757c5b
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/VACoreConfig.cpp
View file @
b2a60331
...
...
@@ -137,6 +137,9 @@ void CVACoreConfig::Init( const CVAStruct& oData )
conf
.
OptNumber
(
"Calibration/DefaultMinimumDistance"
,
dDefaultMinimumDistance
,
0.25
f
);
// translates +12 dB SPL
conf
.
OptNumber
(
"Calibration/DefaultDistance"
,
dDefaultDistance
,
2.0
f
);
// translates to -6 dB SPL
conf
.
OptBool
(
"RemoteShutdownAllowed"
,
bRemoteShutdownAllowed
,
true
);
}
const
CVAStruct
&
CVACoreConfig
::
GetStruct
()
const
...
...
src/VACoreConfig.h
View file @
b2a60331
...
...
@@ -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
...
...
src/VACoreImpl.cpp
View file @
b2a60331
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment