WwiseLanguageCookedData.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*******************************************************************************
  2. The content of this file includes portions of the proprietary AUDIOKINETIC Wwise
  3. Technology released in source code form as part of the game integration package.
  4. The content of this file may not be used without valid licenses to the
  5. AUDIOKINETIC Wwise Technology.
  6. Note that the use of the game engine is subject to the Unreal(R) Engine End User
  7. License Agreement at https://www.unrealengine.com/en-US/eula/unreal
  8. License Usage
  9. Licensees holding valid licenses to the AUDIOKINETIC Wwise Technology may use
  10. this file in accordance with the end user license agreement provided with the
  11. software or, alternatively, in accordance with the terms contained
  12. in a written agreement between you and Audiokinetic Inc.
  13. Copyright (c) 2023 Audiokinetic Inc.
  14. *******************************************************************************/
  15. #pragma once
  16. #include "WwiseLanguageCookedData.generated.h"
  17. UENUM(BlueprintType)
  18. enum class EWwiseLanguageRequirement : uint8
  19. {
  20. IsDefault,
  21. IsOptional,
  22. SFX
  23. };
  24. USTRUCT(BlueprintType)
  25. struct WWISEFILEHANDLER_API FWwiseLanguageCookedData
  26. {
  27. GENERATED_BODY()
  28. static const FWwiseLanguageCookedData Sfx;
  29. /**
  30. * @brief Short ID for the Language
  31. */
  32. UPROPERTY(BlueprintReadOnly, VisibleInstanceOnly, Category = "Wwise")
  33. int32 LanguageId = 0;
  34. /**
  35. * @brief Language name as set in Wwise
  36. */
  37. UPROPERTY(BlueprintReadOnly, VisibleInstanceOnly, Category = "Wwise")
  38. FName LanguageName;
  39. /**
  40. * @brief Is this language the default in Wwise
  41. */
  42. UPROPERTY(BlueprintReadOnly, VisibleInstanceOnly, Category = "Wwise")
  43. EWwiseLanguageRequirement LanguageRequirement = EWwiseLanguageRequirement::SFX;
  44. FWwiseLanguageCookedData();
  45. FWwiseLanguageCookedData(int32 LangId, const FName& LangName, EWwiseLanguageRequirement LangRequirement);
  46. void Serialize(FArchive& Ar);
  47. FName GetLanguageName() const { return LanguageName; }
  48. int32 GetLanguageId() const { return LanguageId; }
  49. };
  50. inline uint32 GetTypeHash(const FWwiseLanguageCookedData& InCookedData)
  51. {
  52. return HashCombine(GetTypeHash(InCookedData.LanguageId), GetTypeHash(InCookedData.LanguageName));
  53. }
  54. inline bool operator==(const FWwiseLanguageCookedData& InLhs, const FWwiseLanguageCookedData& InRhs)
  55. {
  56. return InLhs.LanguageId == InRhs.LanguageId && InLhs.LanguageName == InRhs.LanguageName;
  57. }
  58. inline bool operator!=(const FWwiseLanguageCookedData& InLhs, const FWwiseLanguageCookedData& InRhs)
  59. {
  60. return (InLhs.LanguageId != InRhs.LanguageId) || (InLhs.LanguageName != InRhs.LanguageName);
  61. }