From 33999d905ad44315fa936a723c1d60b389805fb6 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 1 Sep 2024 22:21:51 -0500 Subject: [PATCH] iSnd: Fix a fakematch in iVolFromX (#361) --- src/SB/Core/gc/iSnd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SB/Core/gc/iSnd.cpp b/src/SB/Core/gc/iSnd.cpp index d0f57221..47530345 100644 --- a/src/SB/Core/gc/iSnd.cpp +++ b/src/SB/Core/gc/iSnd.cpp @@ -47,7 +47,7 @@ U32 iVolFromX(F32 param1) float f = MAX(param1, 1e-20f); S32 i = 43.43f * xlog(f); - S32 comp = i & (i >> 0x1f); + S32 comp = MIN(i, 0); if (comp < -0x388) { @@ -55,7 +55,7 @@ U32 iVolFromX(F32 param1) } else { - return i & (i >> 0x3f); + return MIN(i, 0); } }