3
0

AudioAllocators.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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/SystemAllocator.h>
  11. #define AUDIO_MEMORY_ALIGNMENT AZCORE_GLOBAL_NEW_ALIGNMENT
  12. namespace Audio
  13. {
  14. ///////////////////////////////////////////////////////////////////////////////////////////////
  15. class AudioSystemAllocator final
  16. : public AZ::SystemAllocator
  17. {
  18. public:
  19. AZ_RTTI(AudioSystemAllocator, "{AE15F55D-BD65-4666-B18B-9ED81999A85B}", AZ::SystemAllocator);
  20. };
  21. using AudioSystemStdAllocator = AZ::AZStdAlloc<AZ::SystemAllocator>;
  22. ///////////////////////////////////////////////////////////////////////////////////////////////
  23. class AudioImplAllocator final
  24. : public AZ::SystemAllocator
  25. {
  26. public:
  27. AZ_RTTI(AudioImplAllocator, "{197D999F-3093-4F9D-A9A0-BA9E2AAA11DC}", AZ::SystemAllocator);
  28. };
  29. using AudioImplStdAllocator = AZ::AZStdAlloc<AZ::SystemAllocator>;
  30. ///////////////////////////////////////////////////////////////////////////////////////////////
  31. class AudioBankAllocator final
  32. : public AZ::SystemAllocator
  33. {
  34. public:
  35. AZ_RTTI(AudioBankAllocator, "{19E89718-400F-42F9-92C3-E7F0DC1CCC1F}", AZ::SystemAllocator);
  36. };
  37. } // namespace Audio
  38. #define AUDIO_SYSTEM_CLASS_ALLOCATOR(type) AZ_CLASS_ALLOCATOR(type, Audio::AudioSystemAllocator)
  39. #define AUDIO_IMPL_CLASS_ALLOCATOR(type) AZ_CLASS_ALLOCATOR(type, Audio::AudioImplAllocator)