From fa69e5e64667ff0afb149abc8c72e6b842f33cfe Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 27 May 2013 17:05:13 -0700 Subject: [PATCH] Didn't need any special logic here after all. --- Core/HLE/sceSas.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Core/HLE/sceSas.cpp b/Core/HLE/sceSas.cpp index faf2265844..9c2f9ba0e8 100644 --- a/Core/HLE/sceSas.cpp +++ b/Core/HLE/sceSas.cpp @@ -23,6 +23,7 @@ // JPCSP is, as it often is, a pretty good reference although I didn't actually use it much yet: // http://code.google.com/p/jpcsp/source/browse/trunk/src/jpcsp/HLE/modules150/sceSasCore.java +#include #include "base/basictypes.h" #include "Log.h" #include "HLE.h" @@ -63,10 +64,6 @@ void __SasShutdown() { } -inline static int absVolume(int vol) { - return vol > 0 ? vol : -vol; -} - u32 sceSasInit(u32 core, u32 grainSize, u32 maxVoices, u32 outputMode, u32 sampleRate) { INFO_LOG(HLE,"sceSasInit(%08x, %i, %i, %i, %i)", core, grainSize, maxVoices, outputMode, sampleRate); @@ -208,8 +205,8 @@ u32 sceSasSetVolume(u32 core, int voiceNum, int leftVol, int rightVol, int effec WARN_LOG(HLE, "%s: invalid voicenum %d", __FUNCTION__, voiceNum); return ERROR_SAS_INVALID_VOICE; } - bool overVolume = absVolume(leftVol) > PSP_SAS_VOL_MAX || absVolume(rightVol) > PSP_SAS_VOL_MAX; - overVolume = overVolume || absVolume(effectLeftVol) > PSP_SAS_VOL_MAX || absVolume(effectRightVol) > PSP_SAS_VOL_MAX; + bool overVolume = abs(leftVol) > PSP_SAS_VOL_MAX || abs(rightVol) > PSP_SAS_VOL_MAX; + overVolume = overVolume || abs(effectLeftVol) > PSP_SAS_VOL_MAX || abs(effectRightVol) > PSP_SAS_VOL_MAX; if (overVolume) return ERROR_SAS_INVALID_VOLUME;