spu: fix a few mixing issues
authornotaz <notasas@gmail.com>
Mon, 19 Sep 2011 23:29:28 +0000 (02:29 +0300)
committernotaz <notasas@gmail.com>
Mon, 19 Sep 2011 23:29:28 +0000 (02:29 +0300)
plugins/dfsound/arm_utils.s
plugins/dfsound/spu.c

index a278174..6d3c974 100644 (file)
@@ -42,9 +42,9 @@ mix_chan:
 
 mc_finish:
     vstmia      r2!, {d2}
-    cmp         r1, #2
+    cmp         r1, #-2
     vstmiage    r2!, {d3}
-    cmp         r1, #3
+    cmp         r1, #-1
     vstmiage    r2!, {d4}
     bx          lr
 
@@ -87,10 +87,10 @@ mix_chan_rvb:
 mcr_finish:
     vstmia      r2!, {d2}
     vstmia      r3!, {d6}
-    cmp         r1, #2
+    cmp         r1, #-2
     vstmiage    r2!, {d3}
     vstmiage    r3!, {d7}
-    cmp         r1, #3
+    cmp         r1, #-1
     vstmiage    r2!, {d4}
     vstmiage    r3!, {d8}
     bx          lr
index cb639b2..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);