WwiseWriteFileState.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 "Wwise/WwiseFileState.h"
  17. #include "Wwise/WwiseStreamableFileStateInfo.h"
  18. class WWISEFILEHANDLER_API FWwiseWriteFileState : public FWwiseFileState, protected FWwiseStreamableFileStateInfo
  19. {
  20. public:
  21. FWwiseWriteFileState(IFileHandle* InFileHandle, const FString& InFilePathName);
  22. virtual ~FWwiseWriteFileState() override;
  23. void CloseStreaming() override;
  24. bool CanProcessFileOp() const override;
  25. AKRESULT ProcessWrite(AkFileDesc& InFileDesc, const AkIoHeuristics& InHeuristics, AkAsyncIOTransferInfo& OutTransferInfo, FWwiseAkFileOperationDone&& InFileOpDoneCallback) override;
  26. using FWwiseStreamableFileStateInfo::GetFileDesc;
  27. protected:
  28. IFileHandle* FileHandle;
  29. FString FilePathName;
  30. const TCHAR* GetManagingTypeName() const override { return TEXT("Write"); }
  31. uint32 GetShortId() const override { return 0; }
  32. void OpenFile(FOpenFileCallback&& InCallback) override { OpenFileSucceeded(MoveTemp(InCallback)); }
  33. void LoadInSoundEngine(FLoadInSoundEngineCallback&& InCallback) override { LoadInSoundEngineSucceeded(MoveTemp(InCallback)); }
  34. void UnloadFromSoundEngine(FUnloadFromSoundEngineCallback&& InCallback) override { UnloadFromSoundEngineDone(MoveTemp(InCallback)); }
  35. void CloseFile(FCloseFileCallback&& InCallback) override { CloseFileDone(MoveTemp(InCallback)); }
  36. };