AkAuxBus.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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/WwiseLocalizedAuxBusCookedData.h"
  18. #include "Wwise/Info/WwiseObjectInfo.h"
  19. #include "Wwise/Loaded/WwiseLoadedAuxBus.h"
  20. #include "AkAudioBank.h"
  21. #include "AkAuxBus.generated.h"
  22. class UAkAudioBank;
  23. UCLASS(hidecategories=(Advanced, Attachment, Volume), BlueprintType)
  24. class AKAUDIO_API UAkAuxBus : public UAkAudioType
  25. {
  26. GENERATED_BODY()
  27. public:
  28. #if WITH_EDITORONLY_DATA
  29. UPROPERTY(EditAnywhere, Category = "AkAuxBus")
  30. FWwiseObjectInfo AuxBusInfo;
  31. #endif
  32. UPROPERTY(Transient, EditAnywhere, Category = "AkAuxBus")
  33. FWwiseLocalizedAuxBusCookedData AuxBusCookedData;
  34. UPROPERTY()
  35. UAkAudioBank* RequiredBank_DEPRECATED = nullptr;
  36. public:
  37. void Serialize(FArchive& Ar) override;
  38. virtual void LoadData() override {LoadAuxBus();}
  39. virtual void UnloadData(bool bAsync = false) override {UnloadAuxBus(bAsync);}
  40. virtual AkUInt32 GetShortID() const override {return AuxBusCookedData.AuxBusId;}
  41. #if WITH_EDITORONLY_DATA
  42. virtual FWwiseObjectInfo* GetInfoMutable() override {return &AuxBusInfo;}
  43. virtual FWwiseObjectInfo GetInfo() const override{return AuxBusInfo;}
  44. virtual bool ObjectIsInSoundBanks() override;
  45. #endif
  46. private:
  47. void LoadAuxBus();
  48. void UnloadAuxBus(bool bAsync);
  49. FWwiseLoadedAuxBus LoadedAuxBus;
  50. #if WITH_EDITORONLY_DATA
  51. virtual void CookAdditionalFilesOverride(const TCHAR* PackageFilename, const ITargetPlatform* TargetPlatform,
  52. TFunctionRef<void(const TCHAR* Filename, void* Data, int64 Size)> WriteAdditionalFile) override;
  53. virtual void FillInfo() override;
  54. #endif
  55. };