X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fdfsound%2Fspu.c;h=7d3f1a0efc2a479d48a41fafb0ae76424ada29eb;hp=6cefd112151e4cebd89bc5b87bbd4e406bf66b5f;hb=2b30c1291db9d9801d51cf85f71f40fe54958898;hpb=16187bfb1518db23ade931cd7358ba973a585180 diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index 6cefd112..7d3f1a0e 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -692,7 +692,7 @@ static void noinline do_decode_bufs(int which, int start, int count) static int do_samples(int forced_updates) { int volmult = iVolume; - int ns,ns_from,ns_to; + int ns,ns_from,ns_to,ns_len; int ch,d,silentch; int bIRQReturn=0; @@ -740,21 +740,22 @@ static int do_samples(int forced_updates) lastch=ch; lastns=ns_to=d; } + ns_len = ns_to - ns_from; MixADSR(ch, ns_from, ns_to); if(ch==1 || ch==3) { - do_decode_bufs(ch/2, ns_from, ns_to-ns_from); + do_decode_bufs(ch/2, ns_from, ns_len); decode_dirty_ch |= 1<