X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fdfsound%2Fxa.c;h=c3658af41b862a304f82446f3b1cab09ca6077de;hb=HEAD;hp=6b5433fbd13378124199d46047d222181307e623;hpb=894cbc49fa8263d7ee465159175c994155c87ea6;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; + } } ////////////////////////////////////////////////////////////////////////