From 8680e8229414b74335e2c1d05cc678cf8bab685b Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 8 Feb 2011 01:27:36 +0200 Subject: [PATCH] spu: handle channels better in 'IRQ wait' case --- plugins/dfsound/spu.c | 57 ++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 28 deletions(-) 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