Plasma Engine  2.0
Loading...
Searching...
No Matches
AudioRtpcComponent.h
1#pragma once
2
3#include <AudioSystemPlugin/AudioSystemPluginDLL.h>
4
5#include <AudioSystemPlugin/Components/AudioSystemComponent.h>
6#include <AudioSystemPlugin/Core/AudioSystemData.h>
7#include <AudioSystemPlugin/Core/AudioSystemMessages.h>
8
10
12class PL_AUDIOSYSTEMPLUGIN_DLL plAudioRtpcComponent : public plAudioSystemProxyDependentComponent
13{
15
16 // plComponent
17
18public:
19 void Initialize() override;
20 void SerializeComponent(plWorldWriter& stream) const override;
21 void DeserializeComponent(plWorldReader& stream) override;
22
23 // plAudioSystemComponent
24
25private:
26 void plAudioSystemComponentIsAbstract() override {}
27
28 // plAudioRtpcComponent
29
30public:
32 ~plAudioRtpcComponent() override;
33
38 void SetValue(float fValue, bool bSync = false);
39
42 [[nodiscard]] float GetValue() const;
43
46 void OnSetValue(plMsgAudioSystemSetRtpcValue& msg);
47
48private:
49 plString m_sRtpcName;
50 float m_fInitialValue;
51 float m_fValue;
52
54};
Component used to set the value of a real-time parameter in the audio middleware.
Definition AudioRtpcComponent.h:13
Base class for audio system components that depends on an audio proxy component.
Definition AudioSystemComponent.h:46
void Initialize() override
Can be overridden for basic initialization that depends on a valid hierarchy and position.
Definition AudioSystemComponent.cpp:46
virtual void SerializeComponent(plWorldWriter &inout_stream) const
Override this to save the current state of the component to the given stream.
Definition Component.cpp:54
virtual void DeserializeComponent(plWorldReader &inout_stream)
Override this to load the current state of the component from the given stream.
Definition Component.cpp:58
Definition ComponentManager.h:88
A message sender that sends all messages to the next component derived from plEventMessageHandlerComp...
Definition EventMessage.h:39
Reads a world description from a stream. Allows to instantiate that world multiple times in different...
Definition WorldReader.h:47
Stores an entire plWorld in a stream.
Definition WorldWriter.h:13
Definition AudioSystemMessages.h:11