Allocators for audio system file cache (#1485)

* Reinstates an allocator for FileCacheManager

Replaces the allocator that was removed during redcode that is used for
loading banks.  Default schema for now to get things working again.

* Update path functions to AZ::IO::Path

Removes old PathUtil functions in favor of AZ::IO::Path apis.

* Update the audio allocator classes

Cleans up the audio allocator classes a bit.

* Addresses PR feedback

Updates some code to handle nullptr a bit better, and improve log
messages.

* Updates to audio CVars and address feedback

Per feedback, converted more of the audio cvars to AZ_CVAR, but not all
of them could be converted at this time.  Moved audio allocator
initialization to system component ctor/dtor to give RAII.  Updated
location of a PAL file.

* Updates the copyright of the file added in this PR

Merged copyright changes, so need to update new files.
This commit is contained in:
Eric Phister
2021-06-23 16:57:48 -05:00
committed by GitHub
parent 3d0093307f
commit 0a68f23ee0
20 changed files with 342 additions and 283 deletions
@@ -75,7 +75,7 @@ namespace Audio
CAudioSystem::CAudioSystem()
: m_bSystemInitialized(false)
{
m_apAudioProxies.reserve(g_audioCVars.m_nAudioObjectPoolSize);
m_apAudioProxies.reserve(Audio::CVars::s_AudioObjectPoolSize);
m_apAudioProxiesToBeFreed.reserve(16);
AudioSystemRequestBus::Handler::BusConnect();
@@ -247,7 +247,7 @@ namespace Audio
m_oATL.Initialize();
m_audioSystemThread.Activate(this);
for (int i = 0; i < g_audioCVars.m_nAudioObjectPoolSize; ++i)
for (AZ::u64 i = 0; i < Audio::CVars::s_AudioObjectPoolSize; ++i)
{
auto audioProxy = azcreate(CAudioProxy, (), Audio::AudioSystemAllocator, "AudioProxy");
m_apAudioProxies.push_back(audioProxy);
@@ -437,7 +437,7 @@ namespace Audio
return;
}
if (m_apAudioProxies.size() < g_audioCVars.m_nAudioObjectPoolSize)
if (m_apAudioProxies.size() < Audio::CVars::s_AudioObjectPoolSize)
{
m_apAudioProxies.push_back(audioProxy);
}