From 492d67c6e803a83b3ac5c14f0504d82c85e96b30 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sat, 12 Jul 2014 15:59:29 +0200 Subject: [PATCH] spu2x: use std::abs (c abs support only integer) --- plugins/spu2-x/src/DplIIdecoder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/spu2-x/src/DplIIdecoder.cpp b/plugins/spu2-x/src/DplIIdecoder.cpp index 4fad8137af..77da73f87b 100644 --- a/plugins/spu2-x/src/DplIIdecoder.cpp +++ b/plugins/spu2-x/src/DplIIdecoder.cpp @@ -82,8 +82,8 @@ void ProcessDplIISample32( const StereoOut32& src, Stereo51Out32DplII * s) float R = IR - C; // Peak L/R - float PL = abs(L); - float PR = abs(R); + float PL = std::abs(L); + float PR = std::abs(R); AccL += (PL-AccL)*0.1f; AccR += (PR-AccR)*0.1f; @@ -92,7 +92,7 @@ void ProcessDplIISample32( const StereoOut32& src, Stereo51Out32DplII * s) float Balance = (AccR-AccL); // -1 .. 1 // If the power levels are different, then the audio is meant for the front speakers - float Frontness = abs(Balance); + float Frontness = std::abs(Balance); float Rearness = 1-Frontness; // And the other way around // Equalize the power levels for L/R