diff options
author | notaz | 2011-10-06 00:22:46 +0300 |
---|---|---|
committer | notaz | 2011-10-08 03:29:31 +0300 |
commit | 76d1d09c1224af8d663ce63dc5b32425bd62cb29 (patch) | |
tree | 85746dfaef188d543631df549ae178329e38837b | |
parent | 2f546f9ace7c7e4b0957aff512dc0616b01b3976 (diff) | |
download | pcsx_rearmed-76d1d09c1224af8d663ce63dc5b32425bd62cb29.tar.gz pcsx_rearmed-76d1d09c1224af8d663ce63dc5b32425bd62cb29.tar.bz2 pcsx_rearmed-76d1d09c1224af8d663ce63dc5b32425bd62cb29.zip |
spu: make "simple" interpolation even more simple
that division is not worth the quality increase it might give,
also sinc now can be 0 after resets, causing div0 fault.
-rw-r--r-- | plugins/dfsound/spu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index b3bd057..d7dc1b6 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -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]; |