AudioEngineWwiseModule.cpp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 "AudioEngineWwiseGemSystemComponent.h"
  12. #if defined(AUDIO_ENGINE_WWISE_BUILDER)
  13. #include <AudioControlBuilderComponent.h>
  14. #include <WwiseBuilderComponent.h>
  15. #endif // AUDIO_ENGINE_WWISE_BUILDER
  16. namespace AudioEngineWwiseGem
  17. {
  18. class AudioEngineWwiseModule
  19. : public CryHooksModule
  20. {
  21. public:
  22. AZ_RTTI(AudioEngineWwiseModule, "{303B0192-D866-4378-9342-728AA6E66F74}", CryHooksModule);
  23. AZ_CLASS_ALLOCATOR(AudioEngineWwiseModule, AZ::SystemAllocator);
  24. AudioEngineWwiseModule()
  25. : CryHooksModule()
  26. {
  27. m_descriptors.insert(m_descriptors.end(), {
  28. #if defined(AUDIO_ENGINE_WWISE_BUILDER)
  29. AudioControlBuilder::BuilderPluginComponent::CreateDescriptor(),
  30. WwiseBuilder::BuilderPluginComponent::CreateDescriptor(),
  31. #else
  32. AudioEngineWwiseGemSystemComponent::CreateDescriptor(),
  33. #endif // AUDIO_ENGINE_WWISE_BUILDER
  34. });
  35. }
  36. /**
  37. * Add required SystemComponents to the SystemEntity.
  38. */
  39. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  40. {
  41. return AZ::ComponentTypeList {
  42. #if !defined(AUDIO_ENGINE_WWISE_BUILDER)
  43. azrtti_typeid<AudioEngineWwiseGemSystemComponent>(),
  44. #endif // !AUDIO_ENGINE_WWISE_BUILDER
  45. };
  46. }
  47. };
  48. } // namespace AudioEngineWwiseGem
  49. // DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM
  50. // The first parameter should be GemName_GemIdLower
  51. // The second should be the fully qualified name of the class above
  52. AZ_DECLARE_MODULE_CLASS(Gem_AudioEngineWwise, AudioEngineWwiseGem::AudioEngineWwiseModule)