Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
VABase
Commits
7af19924
Commit
7af19924
authored
Dec 09, 2016
by
Jonas Stienen
Browse files
Adding log level string helper
parent
cbd11b56
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/VACore.h
View file @
7af19924
...
...
@@ -1389,6 +1389,8 @@ public:
static
bool
IsValidVolume
(
double
dVolume
);
static
bool
IsValidAudiofileSignalSourcePlaybackAction
(
int
iAction
);
static
std
::
string
GetLogLevelStr
(
int
iLogLevel
);
//! Parses an auralization mode from a string (short format only)
/**
* This method takes a string with auralization modes in short format
...
...
src/VACore.cpp
View file @
7af19924
...
...
@@ -90,8 +90,20 @@ bool IVACore::IsValidAudiofileSignalSourcePlaybackAction( int iAction )
return
false
;
}
std
::
string
IVACore
::
GetLogLevelStr
(
int
iLogLevel
)
{
if
(
iLogLevel
==
IVACore
::
VA_LOG_LEVEL_QUIET
)
return
"QUIET"
;
if
(
iLogLevel
==
IVACore
::
VA_LOG_LEVEL_ERROR
)
return
"ERRORS"
;
if
(
iLogLevel
==
IVACore
::
VA_LOG_LEVEL_WARNING
)
return
"WARNINGS"
;
if
(
iLogLevel
==
IVACore
::
VA_LOG_LEVEL_INFO
)
return
"INFOS"
;
if
(
iLogLevel
==
IVACore
::
VA_LOG_LEVEL_VERBOSE
)
return
"VERBOSE"
;
if
(
iLogLevel
==
IVACore
::
VA_LOG_LEVEL_TRACE
)
return
"TRACE"
;
return
"UNDEFINED"
;
}
// Parses a token of an auralization mode part (must be uppercase, used below)
int
ParseAuralizationModeToken
(
const
std
::
string
&
t
)
{
int
ParseAuralizationModeToken
(
const
std
::
string
&
t
)
{
if
(
t
==
"DS"
)
return
IVACore
::
VA_AURAMODE_DIRECT_SOUND
;
if
(
t
==
"ER"
)
return
IVACore
::
VA_AURAMODE_EARLY_REFLECTIONS
;
if
(
t
==
"DD"
)
return
IVACore
::
VA_AURAMODE_DIFFUSE_DECAY
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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