diff options
author | Chris Robinson <[email protected]> | 2020-05-13 00:57:03 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-05-13 00:57:03 -0700 |
commit | 91b8387c0a1f6025b01cd62584030fbc7ddc3d11 (patch) | |
tree | c4f0308418811d7e19695fb3c76083cd6d039580 | |
parent | f5bf7dc76eb6d5924893d8cfacc01f14a20be141 (diff) |
Give names to parameter value constants
-rw-r--r-- | alc/alc.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index 258d3de3..707fc34d 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -1726,9 +1726,23 @@ static void alcSetError(ALCdevice *device, ALCenum errorCode) static std::unique_ptr<Compressor> CreateDeviceLimiter(const ALCdevice *device, const float threshold) { + constexpr bool AutoKnee{true}; + constexpr bool AutoAttack{true}; + constexpr bool AutoRelease{true}; + constexpr bool AutoPostGain{true}; + constexpr bool AutoDeclip{true}; + constexpr float LookAheadTime{0.001f}; + constexpr float HoldTime{0.002f}; + constexpr float PreGainDb{0.0f}; + constexpr float PostGainDb{0.0f}; + constexpr float Ratio{std::numeric_limits<float>::infinity()}; + constexpr float KneeDb{0.0f}; + constexpr float AttackTime{0.02f}; + constexpr float ReleaseTime{0.2f}; + return Compressor::Create(device->RealOut.Buffer.size(), static_cast<float>(device->Frequency), - AL_TRUE, AL_TRUE, AL_TRUE, AL_TRUE, AL_TRUE, 0.001f, 0.002f, 0.0f, 0.0f, threshold, - std::numeric_limits<float>::infinity(), 0.0f, 0.020f, 0.200f); + AutoKnee, AutoAttack, AutoRelease, AutoPostGain, AutoDeclip, LookAheadTime, HoldTime, + PreGainDb, PostGainDb, threshold, Ratio, KneeDb, AttackTime, ReleaseTime); } /** |