pcm: declare IsSilentSample as const

GNU libstdc++ declares cmath functions as constexpr, but libc++ does
not. The C++ standards state the standard library functions should not
be declared constexpr unless explicitly required.
This commit is contained in:
John Regan 2023-05-24 15:05:19 -04:00
parent 838af929a0
commit a482c798ad

View File

@ -86,7 +86,8 @@ CalcStereoRMS(std::span<const ReplayGainAnalyzer::Frame> src) noexcept
return 10 * std::log10(sum / src.size()) + 90.0 - 3.0;
}
static constexpr bool
[[gnu::const]]
static bool
IsSilentSample(float value) noexcept
{
return std::fabs(value) <= 1e-10f;