WwiseFileStateTools.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 "AkInclude.h"
  17. #include "UObject/NameTypes.h"
  18. class FString;
  19. class IMappedFileRegion;
  20. class IMappedFileHandle;
  21. class WWISEFILEHANDLER_API FWwiseFileStateTools
  22. {
  23. public:
  24. virtual ~FWwiseFileStateTools() {}
  25. protected:
  26. static uint8* AllocateMemory(int64 InMemorySize,
  27. bool bInDeviceMemory, int32 InMemoryAlignment, bool bInEnforceMemoryRequirements,
  28. const FName& InStat, const FName& InStatDevice);
  29. static void DeallocateMemory(const uint8* InMemoryPtr, int64 InMemorySize,
  30. bool bInDeviceMemory, int32 InMemoryAlignment, bool bInEnforceMemoryRequirements,
  31. const FName& InStat, const FName& InStatDevice);
  32. static bool GetMemoryMapped(IMappedFileHandle*& OutMappedHandle, IMappedFileRegion*& OutMappedRegion, int64& OutSize,
  33. const FString& InFilePathname, int32 InMemoryAlignment,
  34. const FName& InStat);
  35. static bool GetMemoryMapped(IMappedFileHandle*& OutMappedHandle, int64& OutSize,
  36. const FString& InFilePathname, int32 InMemoryAlignment,
  37. const FName& InStat);
  38. static bool GetMemoryMappedRegion(IMappedFileRegion*& OutMappedRegion, IMappedFileHandle& InMappedHandle);
  39. static void UnmapRegion(IMappedFileRegion& InMappedRegion);
  40. static void UnmapHandle(IMappedFileHandle& InMappedHandle, const FName& InStat);
  41. static bool GetFileToPtr(const uint8*& OutPtr, int64& OutSize,
  42. const FString& InFilePathname, bool bInDeviceMemory, int32 InMemoryAlignment, bool bInEnforceMemoryRequirements,
  43. const FName& InStat, const FName& InStatDevice,
  44. int64 ReadFirstBytes = -1);
  45. };