spu: fix a few mixing issues
[pcsx_rearmed.git] / plugins / dfsound / spu.c
index 36ac018..bea8414 100644 (file)
@@ -762,6 +762,8 @@ static void *MAINThread(void *arg)
          bIRQReturn=1;
          lastch=ch; 
          lastns=ns_to=d;
+         if(d==0)
+          break;
         }
 
        MixADSR(ch, ns_from, ns_to);
@@ -794,7 +796,8 @@ static void *MAINThread(void *arg)
         {
          unsigned char *start=s_chan[ch].pCurr;
 
-         bIRQReturn |= skip_block(ch);
+         // no need for bIRQReturn since the channel is silent
+         iSpuAsyncWait |= skip_block(ch);
          if(start == s_chan[ch].pCurr)
           {
            // looping on self