AudioAllocators.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <AzCore/Debug/Trace.h>
  10. #include <AzCore/Memory/ChildAllocatorSchema.h>
  11. #include <AzCore/Memory/SystemAllocator.h>
  12. #define AUDIO_MEMORY_ALIGNMENT AZCORE_GLOBAL_NEW_ALIGNMENT
  13. namespace Audio
  14. {
  15. ///////////////////////////////////////////////////////////////////////////////////////////////
  16. AZ_CHILD_ALLOCATOR_WITH_NAME(AudioSystemAllocator, "AudioSystemAllocator", "{AE15F55D-BD65-4666-B18B-9ED81999A85B}", AZ::SystemAllocator);
  17. using AudioSystemStdAllocator = AudioSystemAllocator_for_std_t;
  18. ///////////////////////////////////////////////////////////////////////////////////////////////
  19. AZ_CHILD_ALLOCATOR_WITH_NAME(AudioImplAllocator, "AudioImplAllocator", "{197D999F-3093-4F9D-A9A0-BA9E2AAA11DC}", AZ::SystemAllocator);
  20. using AudioImplStdAllocator = AudioImplAllocator_for_std_t;
  21. ///////////////////////////////////////////////////////////////////////////////////////////////
  22. AZ_CHILD_ALLOCATOR_WITH_NAME(AudioBankAllocator, "AudioBankAllocator", "{19E89718-400F-42F9-92C3-E7F0DC1CCC1F}", AZ::SystemAllocator);
  23. } // namespace Audio
  24. #define AUDIO_SYSTEM_CLASS_ALLOCATOR(type) AZ_CLASS_ALLOCATOR(type, Audio::AudioSystemAllocator)
  25. #define AUDIO_IMPL_CLASS_ALLOCATOR(type) AZ_CLASS_ALLOCATOR(type, Audio::AudioImplAllocator)