summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2021-02-17 11:19:39 +0100
committerMichael Forney <mforney@mforney.org>2021-02-17 11:19:39 +0100
commit52b54097bf23ed4f14e82ff21b24f39827055448 (patch)
tree26791c00c9c4806cbb01eeb50df101e8e3bc2e09
parent79cf39c53ab311f61fd3a3826cefeaead6342601 (diff)
downloadplan9front-52b54097bf23ed4f14e82ff21b24f39827055448.tar.xz
games/snes: fix BRR decoding with filters 2 and 3
s1 and s2 should store the last and next to last output, but were set in the wrong order, causing them both to be the last output. This breaks filters 2 and 3, which both utilize s2.
-rw-r--r--sys/src/games/snes/dsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/games/snes/dsp.c b/sys/src/games/snes/dsp.c
index d3a03028f..13406d216 100644
--- a/sys/src/games/snes/dsp.c
+++ b/sys/src/games/snes/dsp.c
@@ -275,8 +275,8 @@ decode(vctxt *p)
d = (s16int)(clamp16(d) << 1);
p->buf[p->bp] = d;
p->buf[p->bp++ + 12] = d;
- s1 = d;
s2 = s1;
+ s1 = d;
brr <<= 4;
}
if(p->bp == 12)