3#include <Core/Interfaces/SoundInterface.h>
4#include <Core/ResourceManager/ResourceHandle.h>
5#include <FmodPlugin/FmodPluginDLL.h>
6#include <Foundation/Configuration/Plugin.h>
7#include <Foundation/Configuration/Singleton.h>
8#include <Foundation/Types/UniquePtr.h>
18enum class plFmodSpeakerMode : plUInt8
29 plFmodSpeakerMode m_SpeakerMode = plFmodSpeakerMode::Mode5Point1;
31 plUInt16 m_uiVirtualChannels = 32;
32 plUInt32 m_uiSamplerRate = 0;
44 static constexpr const plStringView s_sConfigFile =
":project/RuntimeConfigs/FmodConfig.ddl"_plsv;
62 FMOD::Studio::System* GetStudioSystem()
const {
return m_pStudioSystem; }
63 FMOD::System* GetLowLevelSystem()
const {
return m_pLowLevelSystem; }
67 virtual void LoadConfiguration(
plStringView sFile)
override;
71 virtual void SetOverridePlatform(
plStringView sPlatform)
override;
74 virtual void UpdateSound()
override;
77 virtual void SetMasterChannelVolume(
float fVolume)
override;
78 virtual float GetMasterChannelVolume()
const override;
81 virtual void SetMasterChannelMute(
bool bMute)
override;
82 virtual bool GetMasterChannelMute()
const override;
86 virtual void SetMasterChannelPaused(
bool bPaused)
override;
87 virtual bool GetMasterChannelPaused()
const override;
93 virtual void SetSoundGroupVolume(
plStringView sVcaGroupGuid,
float fVolume)
override;
94 virtual float GetSoundGroupVolume(
plStringView sVcaGroupGuid)
const override;
95 void UpdateSoundGroupVolumes();
98 virtual void SetNumListeners(plUInt8 uiNumListeners)
override;
99 virtual plUInt8 GetNumListeners()
override;
109 void SetNumBlendedReverbVolumes(plUInt8 uiNumBlendedVolumes);
115 virtual void SetListenerOverrideMode(
bool bEnabled)
override;
116 virtual void SetListener(plInt32 iIndex,
const plVec3& vPosition,
const plVec3& vForward,
const plVec3& vUp,
const plVec3& vVelocity)
override;
117 plVec3 GetListenerPosition() {
return m_vListenerPosition; }
119 virtual plResult OneShotSound(
plStringView sResourceID,
const plTransform& globalPosition,
float fPitch = 1.0f,
float fVolume = 1.0f,
bool bBlockIfNotLoaded =
true)
override;
123 void QueueSoundBankDataForDeletion(
plDataBuffer* pData);
124 void ClearSoundBankDataDeletionQueue();
125 mutable plMutex m_DeletionQueueMutex;
128 void DetectPlatform();
129 plResult LoadMasterSoundBank(
const char* szMasterBankResourceID);
131 bool m_bInitialized =
false;
132 bool m_bListenerOverrideMode =
false;
133 plVec3 m_vListenerPosition;
134 plUInt8 m_uiNumBlendedVolumes = 4;
136 FMOD::Studio::System* m_pStudioSystem;
137 FMOD::System* m_pLowLevelSystem;
Definition FmodSingleton.h:53
plUInt8 GetNumBlendedReverbVolumes() const
See SetNumBlendedReverbVolumes()
Definition FmodSingleton.h:112
Definition FmodSoundBankResource.h:14
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Provides a simple mechanism for mutual exclusion to prevent multiple threads from accessing a shared ...
Definition Mutex.h:13
Represents a single 'object' in a DDL document, e.g. either a custom type or a primitives list.
Definition OpenDdlReader.h:11
The base class for OpenDDL writers.
Definition OpenDdlWriter.h:13
Definition SoundInterface.h:7
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
All available Fmod platform configurations.
Definition FmodSingleton.h:43
The Fmod configuration to be used on a specific platform.
Definition FmodSingleton.h:27
Definition GameApplicationBase.h:32
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54