GB Audio: Fix performance regression
Jeffrey Pfau jeffrey@endrift.com
Sun, 25 Dec 2016 10:03:28 -0800
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
src/gb/audio.c
→
src/gb/audio.c
@@ -766,7 +766,9 @@ }
} static void _updateEnvelopeDead(struct GBAudioEnvelope* envelope) { - if (!envelope->direction && !envelope->currentVolume) { + if (!envelope->stepTime) { + envelope->dead = envelope->currentVolume ? 1 : 2; + } else if (!envelope->direction && !envelope->currentVolume) { envelope->dead = 2; } else if (envelope->direction && envelope->currentVolume == 0xF) { envelope->dead = 1;