From 91b8387c0a1f6025b01cd62584030fbc7ddc3d11 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 13 May 2020 00:57:03 -0700 Subject: Give names to parameter value constants --- alc/alc.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'alc/alc.cpp') 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 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::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(device->Frequency), - AL_TRUE, AL_TRUE, AL_TRUE, AL_TRUE, AL_TRUE, 0.001f, 0.002f, 0.0f, 0.0f, threshold, - std::numeric_limits::infinity(), 0.0f, 0.020f, 0.200f); + AutoKnee, AutoAttack, AutoRelease, AutoPostGain, AutoDeclip, LookAheadTime, HoldTime, + PreGainDb, PostGainDb, threshold, Ratio, KneeDb, AttackTime, ReleaseTime); } /** -- cgit v1.2.3