diff options
author | Chris Robinson <[email protected]> | 2022-02-20 00:00:28 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-02-20 00:02:56 -0800 |
commit | 0e26e0809d1aaa8501f310982b554565dc9e8beb (patch) | |
tree | 2892cd858f20332240f76fa6eee94737b8c873ed /common | |
parent | d137ee02a83576e046c210b3abdd3bc0a7a6b216 (diff) |
Fix gain_to_level_mb
Diffstat (limited to 'common')
-rw-r--r-- | common/alnumeric.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/alnumeric.h b/common/alnumeric.h index 18df2689..a0b0fcf3 100644 --- a/common/alnumeric.h +++ b/common/alnumeric.h @@ -293,7 +293,7 @@ inline float gain_to_level_mb(float x) { if (x <= 0.0f) return -10'000.0f; - return std::log10(x * 2'000.0f); + return maxf(std::log10(x) * 2'000.0f, -10'000.0f); } #endif /* AL_NUMERIC_H */ |