spu: make "simple" interpolation even more simple
authornotaz <notasas@gmail.com>
Wed, 5 Oct 2011 21:22:46 +0000 (00:22 +0300)
committernotaz <notasas@gmail.com>
Sat, 8 Oct 2011 00:29:31 +0000 (03:29 +0300)
that division is not worth the quality increase it might give,
also sinc now can be 0 after resets, causing div0 fault.

plugins/dfsound/spu.c

index b3bd057..d7dc1b6 100644 (file)
@@ -222,9 +222,10 @@ INLINE void InterpolateUp(int ch)
    s_chan[ch].SB[32]=0;
 
    s_chan[ch].SB[28]=(s_chan[ch].SB[28]*s_chan[ch].sinc)/0x20000L;
-   if(s_chan[ch].sinc<=0x8000)
-        s_chan[ch].SB[29]=s_chan[ch].SB[30]-(s_chan[ch].SB[28]*((0x10000/s_chan[ch].sinc)-1));
-   else s_chan[ch].SB[29]+=s_chan[ch].SB[28];
+   //if(s_chan[ch].sinc<=0x8000)
+   //     s_chan[ch].SB[29]=s_chan[ch].SB[30]-(s_chan[ch].SB[28]*((0x10000/s_chan[ch].sinc)-1));
+   //else
+   s_chan[ch].SB[29]+=s_chan[ch].SB[28];
   }
  else                                                  // no flags? add bigger val (if possible), calc smaller step, set flag1
   s_chan[ch].SB[29]+=s_chan[ch].SB[28];