3
0

AudioWwiseLoader.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 <ACETypes.h>
  10. #include <AzCore/std/string/string_view.h>
  11. #include <AudioSystemControl_wwise.h>
  12. #include <AzCore/XML/rapidxml.h>
  13. namespace AudioControls
  14. {
  15. class CAudioSystemEditor_wwise;
  16. //-------------------------------------------------------------------------------------------//
  17. class CAudioWwiseLoader
  18. {
  19. public:
  20. CAudioWwiseLoader() = default;
  21. void Load(CAudioSystemEditor_wwise* audioSystemImpl);
  22. const AZStd::string& GetLocalizationFolder() const;
  23. private:
  24. void LoadSoundBanks(const AZStd::string_view rootFolder, const AZStd::string_view subPath, bool isLocalized);
  25. void LoadControlsInFolder(const AZStd::string_view folderPath);
  26. void LoadControl(const AZ::rapidxml::xml_node<char>* xmlNode);
  27. void ExtractControlsFromXML(const AZ::rapidxml::xml_node<char>* xmlNode, EWwiseControlTypes type, const AZStd::string_view controlTag, const AZStd::string_view controlNameAttribute);
  28. private:
  29. AZStd::string m_localizationFolder;
  30. CAudioSystemEditor_wwise* m_audioSystemImpl = nullptr;
  31. };
  32. } // namespace AudioControls