summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libs/m4a.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/libs/m4a.c b/src/libs/m4a.c
index 778abb268..5cbeb854f 100644
--- a/src/libs/m4a.c
+++ b/src/libs/m4a.c
@@ -846,18 +846,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;
}