diff --git a/tools/vio2sf/src/vio2sf/desmume/SPU.cpp b/tools/vio2sf/src/vio2sf/desmume/SPU.cpp index 8757a3ba6..7e1c3a712 100644 --- a/tools/vio2sf/src/vio2sf/desmume/SPU.cpp +++ b/tools/vio2sf/src/vio2sf/desmume/SPU.cpp @@ -529,13 +529,13 @@ static FORCEINLINE s32 Interpolate(SPUInterpolationMode INTERPOLATE_MODE, s32 a, ratio = ratio - sputrunc(ratio); double ratio2 = ((1.0 - cos(ratio * M_PI)) * 0.5); //double ratio2 = (1.0f - cos_lut[((int)(ratio*256.0))&0xFF]) / 2.0f; - return (s32)(((1-ratio2)*a) + (ratio2*b)); + return s32floor((float)(((1-ratio2)*a) + (ratio2*b))); } else { //linear interpolation ratio = ratio - sputrunc(ratio); - return s32floor((1-ratio)*a + ratio*b); + return s32floor((float)((1-ratio)*a + ratio*b)); } }