AkAudioMixer.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 "CoreMinimal.h"
  17. #include "Modules/ModuleInterface.h"
  18. #include "Modules/ModuleManager.h"
  19. #include "AudioDevice.h"
  20. /**
  21. * The public interface to this module. In most cases, this interface is only public to sibling modules
  22. * within this plugin.
  23. */
  24. class IAkAudioMixerModule : public IAudioDeviceModule
  25. {
  26. public:
  27. /**
  28. * Singleton-like access to this module's interface. This is just for convenience!
  29. * Beware of calling this during the shutdown phase, though. Your module might have been unloaded already.
  30. *
  31. * @return Returns singleton instance, loading the module on demand if needed
  32. */
  33. static inline IAkAudioMixerModule& Get()
  34. {
  35. return FModuleManager::LoadModuleChecked< IAkAudioMixerModule >( "AkAudioMixer" );
  36. }
  37. /**
  38. * Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true.
  39. *
  40. * @return True if the module is loaded and ready to use
  41. */
  42. static inline bool IsAvailable()
  43. {
  44. return FModuleManager::Get().IsModuleLoaded( "AkAudioMixer" );
  45. }
  46. };
  47. class FAkAudioMixerModule : public IAkAudioMixerModule
  48. {
  49. /** IModuleInterface implementation */
  50. virtual void StartupModule() override;
  51. virtual void ShutdownModule() override;
  52. /** IAudioDeviceModule implementation */
  53. virtual bool IsAudioMixerModule() const override;
  54. //virtual FAudioDevice* CreateAudioDevice() override;
  55. virtual Audio::IAudioMixerPlatformInterface* CreateAudioMixerPlatformInterface() override;
  56. };