Index: Source/platform/audio/DynamicsCompressorKernel.cpp |
diff --git a/Source/platform/audio/DynamicsCompressorKernel.cpp b/Source/platform/audio/DynamicsCompressorKernel.cpp |
index 41869b7472eb33f5ccb324ef31e073c2859544ee..1f52859661de80e1ada66d852538d1bde9491785 100644 |
--- a/Source/platform/audio/DynamicsCompressorKernel.cpp |
+++ b/Source/platform/audio/DynamicsCompressorKernel.cpp |
@@ -294,7 +294,7 @@ void DynamicsCompressorKernel::process(const float* sourceChannels[], |
float desiredGain = m_detectorAverage; |
// Pre-warp so we get desiredGain after sin() warp below. |
- float scaledDesiredGain = asinf(desiredGain) / (0.5f * piFloat); |
+ float scaledDesiredGain = asinf(desiredGain) / (piOverTwoFloat); |
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
// Deal with envelopes |
@@ -426,7 +426,7 @@ void DynamicsCompressorKernel::process(const float* sourceChannels[], |
} |
// Warp pre-compression gain to smooth out sharp exponential transition points. |
- float postWarpCompressorGain = sinf(0.5f * piFloat * compressorGain); |
+ float postWarpCompressorGain = sinf(piOverTwoFloat * compressorGain); |
// Calculate total gain using master gain and effect blend. |
float totalGain = dryMix + wetMix * masterLinearGain * postWarpCompressorGain; |