AkDeprecated.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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 "Serialization/BulkData.h"
  17. #include "UObject/Object.h"
  18. #include "AkAudioType.h"
  19. #include "AkDeprecated.generated.h"
  20. //These classes are deprecated but we use them during migration to clean up old assets
  21. UCLASS()
  22. class AKAUDIO_API UAkAssetData : public UObject
  23. {
  24. GENERATED_BODY()
  25. FByteBulkData Data;
  26. void Serialize(FArchive& Ar) override
  27. {
  28. Super::Serialize(Ar);
  29. Data.Serialize(Ar, this);
  30. }
  31. };
  32. UCLASS()
  33. class AKAUDIO_API UAkAssetPlatformData : public UObject
  34. {
  35. GENERATED_BODY()
  36. #if WITH_EDITORONLY_DATA
  37. UPROPERTY(transient, VisibleAnywhere, Category = "UAkAssetData")
  38. TMap<FString, UAkAssetData*> AssetDataPerPlatform;
  39. #endif
  40. UPROPERTY(transient)
  41. UAkAssetData* CurrentAssetData = nullptr;
  42. void Serialize(FArchive& Ar) override
  43. {
  44. Super::Serialize(Ar);
  45. #if WITH_EDITORONLY_DATA
  46. Ar << AssetDataPerPlatform;
  47. #endif
  48. }
  49. };
  50. struct AKAUDIO_API FAkMediaDataChunk
  51. {
  52. FByteBulkData Data;
  53. bool IsPrefetch = false;
  54. void Serialize(FArchive& Ar, UObject* Owner)
  55. {
  56. Ar << IsPrefetch;
  57. Data.Serialize(Ar, Owner);
  58. }
  59. };
  60. UCLASS()
  61. class AKAUDIO_API UAkMediaAssetData : public UObject
  62. {
  63. GENERATED_BODY()
  64. TIndirectArray<FAkMediaDataChunk> DataChunks;
  65. void Serialize(FArchive& Ar) override
  66. {
  67. Super::Serialize(Ar);
  68. int32 numChunks = DataChunks.Num();
  69. Ar << numChunks;
  70. if (Ar.IsLoading())
  71. {
  72. DataChunks.Empty();
  73. for (int32 i = 0; i < numChunks; ++i)
  74. {
  75. DataChunks.Add(new FAkMediaDataChunk());
  76. }
  77. }
  78. for (int32 i = 0; i < numChunks; ++i)
  79. {
  80. DataChunks[i].Serialize(Ar, this);
  81. }
  82. }
  83. };
  84. UCLASS()
  85. class AKAUDIO_API UAkMediaAsset : public UObject
  86. {
  87. GENERATED_BODY()
  88. UPROPERTY(transient, VisibleAnywhere, Category = "AkMediaAsset")
  89. TMap<FString, UAkMediaAssetData*> MediaAssetDataPerPlatform;
  90. void Serialize(FArchive& Ar) override
  91. {
  92. Super::Serialize(Ar);
  93. Ar << MediaAssetDataPerPlatform;
  94. }
  95. };
  96. UCLASS()
  97. class AKAUDIO_API UAkLocalizedMediaAsset : public UAkMediaAsset
  98. {
  99. GENERATED_BODY()
  100. };
  101. UCLASS()
  102. class AKAUDIO_API UAkExternalMediaAsset : public UAkMediaAsset
  103. {
  104. GENERATED_BODY()
  105. };
  106. UCLASS()
  107. class AKAUDIO_API UAkFolder : public UAkAudioType
  108. {
  109. GENERATED_BODY()
  110. #if WITH_EDITORONLY_DATA
  111. virtual FWwiseObjectInfo* GetInfoMutable() override { return nullptr; }
  112. #endif
  113. };