GB Audio: Fix channel 4 sampling
Jeffrey Pfau jeffrey@endrift.com
Sat, 17 Sep 2016 12:36:24 -0700
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/gb/audio.c
→
src/gb/audio.c
@@ -553,7 +553,7 @@ audio->nextCh4 -= audio->eventDiff;
if (!audio->ch4.envelope.dead && frame == 7) { --audio->ch4.envelope.nextStep; if (audio->ch4.envelope.nextStep == 0) { - int8_t sample = (audio->ch4.sample >> 31) * 0x8; + int8_t sample = (audio->ch4.sample >> 7) * 0x8; _updateEnvelope(&audio->ch4.envelope); audio->ch4.sample = sample * audio->ch4.envelope.currentVolume; }