MpcdecDecoderPlugin: use std variant of pow
It's available with uClibc-ng. It also offers overloads. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
f319f88df4
commit
e87454ae88
@ -25,12 +25,12 @@
|
|||||||
#include "tag/Handler.hxx"
|
#include "tag/Handler.hxx"
|
||||||
#include "util/Domain.hxx"
|
#include "util/Domain.hxx"
|
||||||
#include "util/Clamp.hxx"
|
#include "util/Clamp.hxx"
|
||||||
#include "util/Math.hxx"
|
|
||||||
#include "util/ScopeExit.hxx"
|
#include "util/ScopeExit.hxx"
|
||||||
#include "Log.hxx"
|
#include "Log.hxx"
|
||||||
|
|
||||||
#include <mpc/mpcdec.h>
|
#include <mpc/mpcdec.h>
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
struct mpc_decoder_data {
|
struct mpc_decoder_data {
|
||||||
@ -142,7 +142,7 @@ ImportMpcdecReplayGain(mpc_uint16_t gain, mpc_uint16_t peak) noexcept
|
|||||||
|
|
||||||
if (gain != 0 && peak != 0) {
|
if (gain != 0 && peak != 0) {
|
||||||
t.gain = MPC_OLD_GAIN_REF - (gain / 256.);
|
t.gain = MPC_OLD_GAIN_REF - (gain / 256.);
|
||||||
t.peak = pow(10, peak / 256. / 20) / 32767;
|
t.peak = std::pow(10, peak / 256. / 20) / 32767;
|
||||||
}
|
}
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
|
Loading…
Reference in New Issue
Block a user