diff options
author | notaz | 2013-01-05 04:04:35 +0200 |
---|---|---|
committer | notaz | 2013-01-05 04:06:39 +0200 |
commit | f9fe492349dcb13ca16e1c809bd2bd25f4a73f10 (patch) | |
tree | 1fc7edafebba0ccf21a8a7905fd7c8d1f4c6bffa /plugins/dfsound | |
parent | e34a4bd3b3eec3f95f5ce0cac1c4d47bf03a0409 (diff) | |
download | pcsx_rearmed-f9fe492349dcb13ca16e1c809bd2bd25f4a73f10.tar.gz pcsx_rearmed-f9fe492349dcb13ca16e1c809bd2bd25f4a73f10.tar.bz2 pcsx_rearmed-f9fe492349dcb13ca16e1c809bd2bd25f4a73f10.zip |
spu: stop at address 0
or should we? (Music 2000)
Diffstat (limited to 'plugins/dfsound')
-rw-r--r-- | plugins/dfsound/spu.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index 1456a21..a190b29 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -444,24 +444,30 @@ static int decode_block(int ch) { unsigned char *start; int predict_nr,shift_factor,flags; + int stop = 0; int ret = 0; - start=s_chan[ch].pCurr; // set up the current pos + start = s_chan[ch].pCurr; // set up the current pos + if(start == spuMemC) // ? + stop = 1; if(s_chan[ch].prevflags&1) // 1: stop/loop { if(!(s_chan[ch].prevflags&2)) - { - dwChannelOn&=~(1<<ch); // -> turn everything off - s_chan[ch].bStop=1; - s_chan[ch].ADSRX.EnvelopeVol=0; - } + stop = 1; start = s_chan[ch].pLoop; } else ret = check_irq(ch, start); // hack, see check_irq below.. + if(stop) + { + dwChannelOn &= ~(1<<ch); // -> turn everything off + s_chan[ch].bStop = 1; + s_chan[ch].ADSRX.EnvelopeVol = 0; + } + predict_nr=(int)start[0]; shift_factor=predict_nr&0xf; predict_nr >>= 4; @@ -770,9 +776,9 @@ static int do_samples(int forced_updates) // no need for bIRQReturn since the channel is silent skip_block(ch); - if(start == s_chan[ch].pCurr) + if(start == s_chan[ch].pCurr || start - spuMemC < 0x1000) { - // looping on self + // looping on self or stopped(?) dwChannelDead |= 1<<ch; s_chan[ch].spos = 0; break; |