AudioSystemModule.cpp 1.4 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. #include <AzCore/PlatformDef.h>
  9. #include <AzCore/Memory/SystemAllocator.h>
  10. #include <IGem.h>
  11. #include "AudioSystemGemSystemComponent.h"
  12. namespace AudioSystemGem
  13. {
  14. class AudioSystemModule
  15. : public CryHooksModule
  16. {
  17. public:
  18. AZ_RTTI(AudioSystemModule, "{BE8CD7ED-AEB9-4617-B069-D848EA986ED3}", CryHooksModule);
  19. AZ_CLASS_ALLOCATOR(AudioSystemModule, AZ::SystemAllocator);
  20. AudioSystemModule()
  21. : CryHooksModule()
  22. {
  23. m_descriptors.insert(m_descriptors.end(), {
  24. AudioSystemGemSystemComponent::CreateDescriptor(),
  25. });
  26. }
  27. /**
  28. * Add required SystemComponents to the SystemEntity.
  29. */
  30. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  31. {
  32. return AZ::ComponentTypeList {
  33. azrtti_typeid<AudioSystemGemSystemComponent>(),
  34. };
  35. }
  36. };
  37. } // namespace AudioSystemGem
  38. #if defined(O3DE_GEM_NAME)
  39. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), AudioSystemGem::AudioSystemModule)
  40. #else
  41. AZ_DECLARE_MODULE_CLASS(Gem_AudioSystem, AudioSystemGem::AudioSystemModule)
  42. #endif