X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fdfsound%2Fxa.c;h=380d1388cee04ef9e7e7b3b62511d25922fbe6e0;hb=2fb8465594a7ffb7ccbac39fdedf7c70085d7f63;hp=6b5433fbd13378124199d46047d222181307e623;hpb=5ccf556f7969fd2a1eeaa097abb2a0684b4c8969;p=pcsx_rearmed.git diff --git a/plugins/dfsound/xa.c b/plugins/dfsound/xa.c index 6b5433fb..380d1388 100644 --- a/plugins/dfsound/xa.c +++ b/plugins/dfsound/xa.c @@ -152,8 +152,16 @@ INLINE void MixCD(int *SSumLR, int *RVB, int ns_to, int decode_pos) } spu.XALastVal = v; } - else + else if (spu.cdClearSamples > 0) + { + for(ns = 0; ns < ns_to; ns++) + { + spu.spuMem[cursor] = spu.spuMem[cursor + 0x400/2] = 0; + cursor = (cursor + 1) & 0x1ff; + } + spu.cdClearSamples -= ns_to; spu.XALastVal = 0; + } } ////////////////////////////////////////////////////////////////////////