Commit 7af19924 authored by Jonas Stienen's avatar Jonas Stienen

Adding log level string helper

parent cbd11b56
......@@ -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
......
......@@ -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;
......
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