X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fdfsound%2Fspu.c;h=0f952fbb5e657d53a9e682352a87b876df9ed3c4;hp=dc0f584575f04a53d0fbc3ebdaff80994d2c0330;hb=5238f6f8fcf43fb8506467b358ee976a8c5fdf6b;hpb=97ea407715c0eafc8d73ffc5477f6d7e6ad8f20b diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index dc0f5845..0f952fbb 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -586,9 +586,12 @@ static void *MAINThread(void *arg) { // We play this block out first... //if(!(flags&2)) // 1+2: do loop... otherwise: stop - if(flags!=3 || s_chan[ch].pLoop==NULL) // PETE: if we don't check exactly for 3, loop hang ups will happen (DQ4, for example) - { // and checking if pLoop is set avoids crashes, yeah + if((flags!=3 && flags!=7) // PETE: if we don't check exactly for 3, loop hang ups will happen (DQ4, for example) + || s_chan[ch].pLoop==NULL) // and checking if pLoop is set avoids crashes, yeah + { start = (unsigned char*)-1; + // Actua Soccer 2, Jungle Book, other games that check for this condition + s_chan[ch].ADSRX.EnvelopeVol = 0; } else { @@ -596,6 +599,9 @@ static void *MAINThread(void *arg) } } + if (start - spuMemC >= 0x80000) + start = (unsigned char*)-1; + s_chan[ch].pCurr=start; // store values for next cycle s_chan[ch].s_1=s_1; s_chan[ch].s_2=s_2; @@ -855,7 +861,7 @@ void SetupStreams(void) (uint32_t *)malloc(16384 * sizeof(uint32_t)); CDDAEnd = CDDAStart + 16384; CDDAPlay = CDDAStart; - CDDAFeed = CDDAStart + 1; + CDDAFeed = CDDAStart; for(i=0;i