Krotos Modules 3
Loading...
Searching...
No Matches
DryWet.h
Go to the documentation of this file.
1namespace krotos
2{
7 class DryWet
8 {
9 public:
10 DryWet() { setMix(0.0f); }
11 DryWet(float mix) { setMix(mix); }
12
13 DryWet& operator=(float mix)
14 {
15 setMix(mix);
16 return *this;
17 }
18
19 void setMix(float mix)
20 {
21 m_dry = std::sqrt(1.0f - mix);
22 m_wet = std::sqrt(mix);
23 }
24
25 float dry() const { return m_dry; }
26 float wet() const { return m_wet; }
27
28 private:
29 float m_dry;
30 float m_wet;
31 };
32} // namespace krotos
Stores a mix value and provides the dry & wet gain values using constant-power mixing.
Definition DryWet.h:8
void setMix(float mix)
Definition DryWet.h:19
DryWet(float mix)
Definition DryWet.h:11
float wet() const
Definition DryWet.h:26
float dry() const
Definition DryWet.h:25
DryWet & operator=(float mix)
Definition DryWet.h:13
DryWet()
Definition DryWet.h:10
float m_wet
Definition DryWet.h:30
float m_dry
Definition DryWet.h:29
Definition AirAbsorptionFilter.cpp:2