Update audio cvars from legacy to AZ_CVARs (#2182)

* Upgrade s_AudioLoggingOptions to AZ_CVAR

Removes this legacy CVar and reimplements it as an AZ_CVAR with similar
functionality of setting flags using alpha characters.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Upgrade s_DrawAudioDebug to AZ_CVAR

Removes the legacy CVar and reimplements it as an AZ_CVAR with similar
functionality and options.

Additional updates to the logging options CVar to fix up flag enums.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Upgrade s_FileCacheManagerDebugFilter to AZ_CVAR

Removes the legacy CVar and reimplements it as an AZ_CVAR with similar
functionality.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Removal of legacy IConsole dependencies from Audio

Moves a g_languageAudio cvar from CrySystem to AudioSystem.
Convert all cvar commands to AZ_CONSOLEFREEFUNC's.
Remove IConsole.h includes from source files.
Removes the CSoundCVars class.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Minor update to cvar comments etc.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
This commit is contained in:
amzn-phist
2021-07-16 12:25:32 -05:00
committed by GitHub
parent 23e22dbb4c
commit 4407891740
14 changed files with 511 additions and 535 deletions
@@ -339,20 +339,17 @@ namespace Audio
///////////////////////////////////////////////////////////////////////////////////////////////
void CFileCacheManager::DrawDebugInfo(IRenderAuxGeom& auxGeom, const float posX, const float posY)
{
if ((g_audioCVars.m_nDrawAudioDebug & eADDF_SHOW_FILECACHE_MANAGER_INFO) != 0)
if (CVars::s_debugDrawOptions.AreAllFlagsActive(DebugDraw::Options::FileCacheInfo))
{
EATLDataScope dataScope = eADS_ALL;
if ((g_audioCVars.m_nFileCacheManagerDebugFilter & eAFCMDF_ALL) == 0)
if (CVars::s_fcmDrawOptions.AreAllFlagsActive(FileCacheManagerDebugDraw::Options::Global))
{
if ((g_audioCVars.m_nFileCacheManagerDebugFilter & eAFCMDF_GLOBALS) != 0)
{
dataScope = eADS_GLOBAL;
}
else if ((g_audioCVars.m_nFileCacheManagerDebugFilter & eAFCMDF_LEVEL_SPECIFICS) != 0)
{
dataScope = eADS_LEVEL_SPECIFIC;
}
dataScope = eADS_GLOBAL;
}
else if (CVars::s_fcmDrawOptions.AreAllFlagsActive(FileCacheManagerDebugDraw::Options::LevelSpecific))
{
dataScope = eADS_LEVEL_SPECIFIC;
}
const auto frameTime = AZStd::chrono::system_clock::now();
@@ -381,11 +378,11 @@ namespace Audio
"FileCacheManager (%zu of %zu KiB) [Entries: %zu]", m_currentByteTotal >> 10, m_maxByteTotal >> 10, m_audioFileEntries.size());
positionY += 15.0f;
bool displayAll = (g_audioCVars.m_nFileCacheManagerDebugFilter == eAFCMDF_ALL);
bool displayGlobals = ((g_audioCVars.m_nFileCacheManagerDebugFilter & eAFCMDF_GLOBALS) != 0);
bool displayLevels = ((g_audioCVars.m_nFileCacheManagerDebugFilter & eAFCMDF_LEVEL_SPECIFICS) != 0);
bool displayUseCounted = ((g_audioCVars.m_nFileCacheManagerDebugFilter & eAFCMDF_USE_COUNTED) != 0);
bool displayLoaded = ((g_audioCVars.m_nFileCacheManagerDebugFilter & eAFCMDF_LOADED) != 0);
const bool displayAll = CVars::s_fcmDrawOptions.GetRawFlags() == 0;
const bool displayGlobals = CVars::s_fcmDrawOptions.AreAllFlagsActive(FileCacheManagerDebugDraw::Options::Global);
const bool displayLevels = CVars::s_fcmDrawOptions.AreAllFlagsActive(FileCacheManagerDebugDraw::Options::LevelSpecific);
const bool displayUseCounted = CVars::s_fcmDrawOptions.AreAllFlagsActive(FileCacheManagerDebugDraw::Options::UseCounted);
const bool displayLoaded = CVars::s_fcmDrawOptions.AreAllFlagsActive(FileCacheManagerDebugDraw::Options::Loaded);
for (auto& audioFileEntryPair : m_audioFileEntries)
{