From: notaz Date: Mon, 7 Feb 2011 23:27:36 +0000 (+0200) Subject: spu: handle channels better in 'IRQ wait' case X-Git-Tag: r6~4 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8680e8229414b74335e2c1d05cc678cf8bab685b;p=pcsx_rearmed.git spu: handle channels better in 'IRQ wait' case --- diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index 8936e45b..084fccf0 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -441,7 +441,7 @@ INLINE int iGetInterpolationVal(int ch) static void *MAINThread(void *arg) { - int s_1,s_2,fa,ns; + int s_1,s_2,fa,ns,ns_from,ns_to; #if !defined(_MACOSX) && !defined(__arm__) int voldiv = iVolume; #else @@ -480,17 +480,19 @@ static void *MAINThread(void *arg) //--------------------------------------------------// continue from irq handling in timer mode? + ns_from=0; + ns_to=NSSIZE; + ch=0; if(lastch>=0) // will be -1 if no continue is pending { - ch=lastch; ns=lastns; lastch=-1; // -> setup all kind of vars to continue - goto GOON; // -> directly jump to the continue point + ch=lastch; ns_from=lastns+1; lastch=-1; // -> setup all kind of vars to continue } //--------------------------------------------------// //- main channel loop -// //--------------------------------------------------// { - for(ch=0;ch