GB Audio: Fix square sample range (fixes #546)
Vicki Pfau vi@endrift.com
Sat, 17 Jun 2017 09:44:55 -0700
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/gb/audio.c
→
src/gb/audio.c
@@ -709,7 +709,7 @@ return (envelope->initialVolume || envelope->direction) && envelope->dead != 2;
} static void _updateSquareSample(struct GBAudioSquareChannel* ch) { - ch->sample = (ch->control.hi * ch->envelope.currentVolume - 8) * 0x10; + ch->sample = (ch->control.hi * 2 - 1) * ch->envelope.currentVolume * 0x8; } static int32_t _updateSquareChannel(struct GBAudioSquareChannel* ch) {