Updating to support Wwise SDK 2021.1.1.X (#686)

* Code updates for Wwise 2021.1.X support.

* [WIP] CMake updates for Wwise 2021.1.X support.

* Updates FindWwise.cmake to search for a Wwise install or let user set it as cache variable.

* Makes Wwise SDK optional, and the AudioEngineWwise Gem will revert to a 'stub' build if no SDK found.

* Adding a .gitignore for Wwise project files.

* Updates a .wcmdline file for integration into Wwise projects.

* Updates the cmake messaging regarding Wwise SDK and smooths out some of configuration scenarios.

* Updates the Wwise project for AutomatedTesting to ver 2021.1.1.7601 and rebuilds banks.
This commit is contained in:
Eric Phister
2021-05-11 15:16:32 -05:00
committed by GitHub
parent ef674b7122
commit ab8738b7c3
64 changed files with 13696 additions and 142 deletions
@@ -66,12 +66,18 @@ namespace Audio
{
void* Malloc(AkMemPoolId memId, size_t size)
{
return AZ::AllocatorInstance<AudioImplAllocator>::Get().Allocate(size, 0, 0, MemoryManagerCategories[memId & AkMemID_MASK]);
size_t memCategory = memId & AkMemID_MASK;
AZ_Assert(memCategory < AkMemID_NUM, "Wwise::MemHooks::Malloc - Bad AkMemPoolId passed: %zu", memCategory);
return AZ::AllocatorInstance<AudioImplAllocator>::Get().Allocate(size, 0, 0,
(memCategory < AkMemID_NUM) ? MemoryManagerCategories[memCategory] : nullptr);
}
void* Malign(AkMemPoolId memId, size_t size, AkUInt32 alignment)
{
return AZ::AllocatorInstance<AudioImplAllocator>::Get().Allocate(size, alignment, 0, MemoryManagerCategories[memId & AkMemID_MASK]);
size_t memCategory = memId & AkMemID_MASK;
AZ_Assert(memCategory < AkMemID_NUM, "WWise::MemHooks::Malign - Bad AkMemPoolId passed: %zu", memCategory);
return AZ::AllocatorInstance<AudioImplAllocator>::Get().Allocate(size, alignment, 0,
(memCategory < AkMemID_NUM) ? MemoryManagerCategories[memCategory] : nullptr);
}
void* Realloc([[maybe_unused]] AkMemPoolId memId, void* address, size_t size)
@@ -79,12 +85,12 @@ namespace Audio
return AZ::AllocatorInstance<AudioImplAllocator>::Get().ReAllocate(address, size, 0);
}
void Free([[maybe_unused]] AkMemPoolId memId, void* address)
void* ReallocAligned([[maybe_unused]] AkMemPoolId memId, void* address, size_t size, AkUInt32 alignment)
{
AZ::AllocatorInstance<AudioImplAllocator>::Get().DeAllocate(address);
return AZ::AllocatorInstance<AudioImplAllocator>::Get().ReAllocate(address, size, alignment);
}
void Falign([[maybe_unused]] AkMemPoolId memId, void* address)
void Free([[maybe_unused]] AkMemPoolId memId, void* address)
{
AZ::AllocatorInstance<AudioImplAllocator>::Get().DeAllocate(address);
}
@@ -427,8 +433,8 @@ namespace Audio
akMemSettings.pfMalloc = Wwise::MemHooks::Malloc;
akMemSettings.pfMalign = Wwise::MemHooks::Malign;
akMemSettings.pfRealloc = Wwise::MemHooks::Realloc;
akMemSettings.pfReallocAligned = Wwise::MemHooks::ReallocAligned;
akMemSettings.pfFree = Wwise::MemHooks::Free;
akMemSettings.pfFalign = Wwise::MemHooks::Falign;
akMemSettings.pfTotalReservedMemorySize = Wwise::MemHooks::TotalReservedMemorySize;
akMemSettings.pfSizeOfMemory = Wwise::MemHooks::SizeOfMemory;
akMemSettings.uMemAllocationSizeLimit = Wwise::Cvars::s_PrimaryMemorySize << 10;