| 15 | } |
| 16 | |
| 17 | float linToDb(float lin) noexcept |
| 18 | { |
| 19 | return (lin > 1e-9f) ? 20.0f * std::log10(lin) : -180.0f; |
| 20 | } |
| 21 | |
| 22 | // Classic time-constant coefficient: y += α·(target - y) with |
| 23 | // α = 1 - exp(-1 / (fs · τ)). Hits ≈63 % of the step in τ seconds. |