Exponential curve for the knee. It is 1st derivative matched at m_linearThreshold and asymptotically approaches the value m_linearThreshold + 1 / k.
| 78 | // Exponential curve for the knee. |
| 79 | // It is 1st derivative matched at m_linearThreshold and asymptotically approaches the value m_linearThreshold + 1 / k. |
| 80 | float DynamicsCompressorKernel::kneeCurve(float x, float k) |
| 81 | { |
| 82 | // Linear up to threshold. |
| 83 | if (x < m_linearThreshold) |
| 84 | return x; |
| 85 | |
| 86 | return m_linearThreshold + (1 - expf(-k * (x - m_linearThreshold))) / k; |
| 87 | } |
| 88 | |
| 89 | // Full compression curve with constant ratio after knee. |
| 90 | float DynamicsCompressorKernel::saturate(float x, float k) |
nothing calls this directly
no outgoing calls
no test coverage detected