MiniAudioEditorSystemComponent.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 <AzToolsFramework/API/ToolsApplicationAPI.h>
  10. #include <AzCore/std/containers/vector.h>
  11. #include <AzCore/std/smart_ptr/unique_ptr.h>
  12. #include <Clients/MiniAudioSystemComponent.h>
  13. #include <Tools/SoundAssetBuilder.h>
  14. #include <Clients/MiniAudioSystemComponent.h>
  15. namespace MiniAudio
  16. {
  17. /// System component for MiniAudio editor
  18. class MiniAudioEditorSystemComponent
  19. : public MiniAudioSystemComponent
  20. , protected AzToolsFramework::EditorEvents::Bus::Handler
  21. {
  22. using BaseSystemComponent = MiniAudioSystemComponent;
  23. public:
  24. AZ_COMPONENT(MiniAudioEditorSystemComponent, "{C221724F-CCA2-454E-97A9-E418A91CB072}", BaseSystemComponent);
  25. static void Reflect(AZ::ReflectContext* context);
  26. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  27. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  28. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  29. static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
  30. MiniAudioEditorSystemComponent() = default;
  31. MiniAudioEditorSystemComponent(const MiniAudioEditorSystemComponent&) = delete;
  32. MiniAudioEditorSystemComponent& operator=(const MiniAudioEditorSystemComponent&) = delete;
  33. // AZ::Component
  34. void Activate() override;
  35. void Deactivate() override;
  36. private:
  37. SoundAssetBuilder m_soundAssetBuilder;
  38. // Assets related data
  39. AZStd::vector<AZStd::unique_ptr<AZ::Data::AssetHandler>> m_assetHandlers;
  40. };
  41. } // namespace MiniAudio