From 60cbcaaa9b3d5ae5182ec26f7c7854c0c469bb94 Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Mon, 19 Apr 2021 23:49:58 -0400 Subject: THE BEAST IS SLAIN --- src/m4a.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/m4a.c b/src/m4a.c index 8772b6f2f..639aa2ac6 100644 --- a/src/m4a.c +++ b/src/m4a.c @@ -871,18 +871,13 @@ void CgbModVol(struct CgbChannel *chan) if ((soundInfo->mode & 1) || !CgbPan(chan)) { chan->pan = 0xFF; - chan->eg = (u32)(chan->rightVolume + chan->leftVolume) >> 4; + chan->eg = (u32)(chan->leftVolume + chan->rightVolume); + chan->eg /= 16; } else { - // Force chan->rightVolume and chan->leftVolume to be read from memory again, - // even though there is no reason to do so. - // The command line option "-fno-gcse" achieves the same result as this. - #ifndef NONMATCHING - asm("" : : : "memory"); - #endif - - chan->eg = (u32)(chan->rightVolume + chan->leftVolume) >> 4; + chan->eg = (u32)(chan->leftVolume + chan->rightVolume); + chan->eg /= 16; if (chan->eg > 15) chan->eg = 15; } -- cgit v1.2.3