WwiseMediaManager.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 "Wwise/WwiseFileHandlerModule.h"
  18. #include "Wwise/WwiseStreamableFileHandler.h"
  19. struct FWwiseMediaCookedData;
  20. class IWwiseMediaManager : public IWwiseStreamableFileHandler
  21. {
  22. public:
  23. inline static IWwiseMediaManager* Get()
  24. {
  25. if (auto* Module = IWwiseFileHandlerModule::GetModule())
  26. {
  27. return Module->GetMediaManager();
  28. }
  29. return nullptr;
  30. }
  31. using FLoadMediaCallback = TUniqueFunction<void(bool bSuccess)>;
  32. using FUnloadMediaCallback = TUniqueFunction<void()>;
  33. virtual void LoadMedia(const FWwiseMediaCookedData& InMediaCookedData, const FString& InRootPath, FLoadMediaCallback&& InCallback) = 0;
  34. virtual void UnloadMedia(const FWwiseMediaCookedData& InMediaCookedData, const FString& InRootPath, FUnloadMediaCallback&& InCallback) = 0;
  35. virtual void SetGranularity(AkUInt32 Uint32) = 0;
  36. };