X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fdfsound%2Fspu.c;h=b89ab1af8c120ba4a25a379a5da9a94f110e8bef;hb=ee9afdbd4d9e0aee75dd9e17878c76f1c7236d04;hp=a190b29b12c8fc2ce2f5a54cca1938756bbe3857;hpb=f9fe492349dcb13ca16e1c809bd2bd25f4a73f10;p=pcsx_rearmed.git diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index a190b29b..b89ab1af 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