Plasma Engine  2.0
Loading...
Searching...
No Matches
AudioTranslationLayer.h
1#pragma once
2
3#include <AudioSystemPlugin/AudioSystemPluginDLL.h>
4
5#include <AudioSystemPlugin/ATL/AudioTranslationLayerData.h>
6#include <AudioSystemPlugin/Core/AudioMiddleware.h>
7#include <AudioSystemPlugin/Core/AudioThread.h>
8
9struct plCVarEvent;
10
16class PL_AUDIOSYSTEMPLUGIN_DLL plAudioTranslationLayer
17{
18 PL_DISALLOW_COPY_AND_ASSIGN(plAudioTranslationLayer);
19
20public:
23
25 [[nodiscard]] plResult Startup();
26
28 void Shutdown();
29
32 void Update();
33
38 [[nodiscard]] plAudioSystemDataID GetTriggerId(plStringView sTriggerName) const;
39
43 [[nodiscard]] plAudioSystemDataID GetRtpcId(plStringView sRtpcName) const;
44
49 [[nodiscard]] plAudioSystemDataID GetSwitchStateId(plStringView sSwitchStateName) const;
50
55 [[nodiscard]] plAudioSystemDataID GetEnvironmentId(plStringView sEnvironmentName) const;
56
57private:
58 friend class plAudioSystem;
59
60 bool ProcessRequest(plVariant&& request, bool bSync);
61 void OnMasterGainChange(const plCVarEvent& e) const;
62 void OnMuteChange(const plCVarEvent& e) const;
63
64#if PL_ENABLED(PL_COMPILE_FOR_DEVELOPMENT)
65 void DebugRender() const;
66#endif
67
68 // ATLObject containers
69 plATLEntityLookup m_mEntities;
70 plATLListenerLookup m_mListeners;
71 plATLTriggerLookup m_mTriggers;
72 plATLRtpcLookup m_mRtpcs;
73 plATLSwitchStateLookup m_mSwitchStates;
74 plATLEnvironmentLookup m_mEnvironments;
75 plATLSoundBankLookup m_mSoundBanks;
76
77 plTime m_LastUpdateTime;
78 plTime m_LastFrameTime;
79
80 plAudioMiddleware* m_pAudioMiddleware{nullptr};
81};
The Audio Middleware Interface. This interface should be implemented by the ATL middleware to communi...
Definition AudioMiddleware.h:14
The AudioSystem.
Definition AudioSystem.h:23
The Audio Translation Layer.
Definition AudioTranslationLayer.h:17
Definition Map.h:408
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition Variant.h:44
The data that is broadcast whenever a cvar is changed.
Definition CVar.h:65
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12