AudioEngineWwiseModule.cpp 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #if defined(O3DE_GEM_NAME)
  50. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), AudioEngineWwiseGem::AudioEngineWwiseModule)
  51. #else
  52. AZ_DECLARE_MODULE_CLASS(Gem_AudioEngineWwise, AudioEngineWwiseGem::AudioEngineWwiseModule)
  53. #endif