Config_wwise.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 <AzCore/PlatformIncl.h> // This include is needed to include WinSock2.h before including Windows.h
  10. // As AK/SoundEngine/Common/AkTypes.h eventually includes Windows.h
  11. #include <AzCore/RTTI/ReflectContext.h>
  12. #include <AzCore/std/string/string.h>
  13. namespace Audio::Wwise
  14. {
  15. static constexpr const char DefaultBanksPath[] = "sounds/wwise/";
  16. static constexpr const char ExternalSourcesPath[] = "external";
  17. static constexpr const char ConfigFile[] = "wwise_config.json";
  18. static constexpr const char BankExtension[] = ".bnk";
  19. static constexpr const char MediaExtension[] = ".wem";
  20. static constexpr const char InitBank[] = "init.bnk";
  21. //! Banks path that's set after reading the configuration settings.
  22. //! This might be different than the DefaultBanksPath.
  23. const AZStd::string_view GetBanksRootPath();
  24. void SetBanksRootPath(const AZStd::string_view path);
  25. /**
  26. * ConfigurationSettings
  27. */
  28. struct ConfigurationSettings
  29. {
  30. AZ_TYPE_INFO(ConfigurationSettings, "{6BEEC05E-C5AE-4270-AAAD-08E27A6B5341}");
  31. AZ_CLASS_ALLOCATOR(ConfigurationSettings, AZ::SystemAllocator);
  32. struct PlatformMapping
  33. {
  34. AZ_TYPE_INFO(PlatformMapping, "{9D444546-784B-4509-A8A5-8E174E345097}");
  35. AZ_CLASS_ALLOCATOR(PlatformMapping, AZ::SystemAllocator);
  36. PlatformMapping() = default;
  37. ~PlatformMapping() = default;
  38. // Serialized Data...
  39. AZStd::string m_assetPlatform; // LY Asset Platform name (i.e. "pc", "mac", "android", ...)
  40. AZStd::string m_altAssetPlatform; // Some platforms can be run using a different asset platform. Useful for builder worker.
  41. AZStd::string m_enginePlatform; // LY Engine Platform name (i.e. "Windows", "Mac", "Android", ...)
  42. AZStd::string m_wwisePlatform; // Wwise Platform name (i.e. "Windows", "Mac", "Android", ...)
  43. AZStd::string m_bankSubPath; // Wwise Banks Sub-Path (i.e. "windows", "mac", "android", ...)
  44. };
  45. ConfigurationSettings() = default;
  46. ~ConfigurationSettings() = default;
  47. static void Reflect(AZ::ReflectContext* context);
  48. bool Load(const AZStd::string& filePath);
  49. bool Save(const AZStd::string& filePath);
  50. // Serialized Data...
  51. AZStd::vector<PlatformMapping> m_platformMappings;
  52. };
  53. } // namespace Audio::Wwise