From 15d66422a9d9404066a143298f092163834c2725 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 8 Jul 2017 21:13:54 -0700 Subject: [PATCH] GB Audio: Fix zombie mode bit masking --- CHANGES | 2 ++ src/gb/audio.c | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 0a46be2c2..21b34a1d2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,6 @@ 0.7.0: (Future) +Bugfixes: + - GB Audio: Fix zombie mode bit masking Misc: - GBA Timer: Use global cycles for timers diff --git a/src/gb/audio.c b/src/gb/audio.c index 3b384cdf8..3f4435731 100644 --- a/src/gb/audio.c +++ b/src/gb/audio.c @@ -702,6 +702,7 @@ bool _writeEnvelope(struct GBAudioEnvelope* envelope, uint8_t value) { if (!envelope->stepTime) { // TODO: Improve "zombie" mode ++envelope->currentVolume; + envelope->currentVolume &= 0xF; } _updateEnvelopeDead(envelope); envelope->nextStep = envelope->stepTime;