diff options
author | notaz | 2013-01-05 04:05:56 +0200 |
---|---|---|
committer | notaz | 2013-01-05 04:54:38 +0200 |
commit | ee9afdbd4d9e0aee75dd9e17878c76f1c7236d04 (patch) | |
tree | 1bfc7363798de7f3c46f097c9f2015f2e1496b99 | |
parent | f9fe492349dcb13ca16e1c809bd2bd25f4a73f10 (diff) | |
download | pcsx_rearmed-ee9afdbd4d9e0aee75dd9e17878c76f1c7236d04.tar.gz pcsx_rearmed-ee9afdbd4d9e0aee75dd9e17878c76f1c7236d04.tar.bz2 pcsx_rearmed-ee9afdbd4d9e0aee75dd9e17878c76f1c7236d04.zip |
spu: fix decode offset
-rw-r--r-- | plugins/dfsound/spu.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index a190b29..b89ab1a 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -671,12 +671,13 @@ static void noinline do_decode_bufs(int which, int start, int count) { const int *src = ChanBuf + start; unsigned short *dst = &spuMem[0x800/2 + which*0x400/2]; - int cursor = decode_pos; + int cursor = decode_pos + start; while (count-- > 0) { + cursor &= 0x1ff; dst[cursor] = *src++; - cursor = (cursor + 1) & 0x1ff; + cursor++; } // decode_pos is updated and irqs are checked later, after voice loop |