Commit 2a58f226 authored by Max Kellermann's avatar Max Kellermann

decoder/mpcdec: use Clamp()

parent f066bb77
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "util/Error.hxx" #include "util/Error.hxx"
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "util/Macros.hxx" #include "util/Macros.hxx"
#include "util/Clamp.hxx"
#include "Log.hxx" #include "Log.hxx"
#include <mpc/mpcdec.h> #include <mpc/mpcdec.h>
...@@ -117,12 +118,7 @@ mpc_to_mpd_sample(MPC_SAMPLE_FORMAT sample) ...@@ -117,12 +118,7 @@ mpc_to_mpd_sample(MPC_SAMPLE_FORMAT sample)
val = sample * float_scale; val = sample * float_scale;
#endif #endif
if (val < clip_min) return Clamp(val, clip_min, clip_max);
val = clip_min;
else if (val > clip_max)
val = clip_max;
return val;
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment