AkInitBank.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 "AkAudioType.h"
  17. #include "Wwise/CookedData/WwiseInitBankCookedData.h"
  18. #include "Wwise/Loaded/WwiseLoadedInitBank.h"
  19. #if WITH_EDITORONLY_DATA
  20. #include "Wwise/Info/WwiseObjectInfo.h"
  21. #endif
  22. #include "AkInitBank.generated.h"
  23. UCLASS()
  24. class AKAUDIO_API UAkInitBank : public UAkAudioType
  25. {
  26. GENERATED_BODY()
  27. public:
  28. UPROPERTY(Transient)
  29. FWwiseInitBankCookedData InitBankCookedData;
  30. #if WITH_EDITORONLY_DATA
  31. void PrepareCookedData();
  32. #endif
  33. TArray<FWwiseLanguageCookedData> GetLanguages();
  34. protected :
  35. FWwiseLoadedInitBank LoadedInitBank;
  36. public:
  37. UAkInitBank():LoadedInitBank(nullptr){}
  38. #if WITH_EDITORONLY_DATA
  39. void CookAdditionalFilesOverride(const TCHAR* PackageFilename, const ITargetPlatform* TargetPlatform,
  40. TFunctionRef<void(const TCHAR* Filename, void* Data, int64 Size)> WriteAdditionalFile) override;
  41. virtual void BeginCacheForCookedPlatformData(const ITargetPlatform* TargetPlatform) override;
  42. virtual FWwiseObjectInfo* GetInfoMutable() override;
  43. #endif
  44. virtual void UnloadData(bool bAsync = false) override;
  45. void LoadInitBank();
  46. void UnloadInitBank(bool bAsync);
  47. protected:
  48. void Serialize(FArchive& Ar) override;
  49. #if WITH_EDITORONLY_DATA
  50. virtual void MigrateWwiseObjectInfo() override;
  51. #endif
  52. };