aboutsummaryrefslogtreecommitdiff
path: root/plugins/dfsound/spu.c
diff options
context:
space:
mode:
authorSakitoshi2019-01-23 22:19:49 -0300
committerSakitoshi2019-01-23 22:19:49 -0300
commit636462080c6b984993d7427b5d7688a362e45c2f (patch)
tree9bbff354dde1c84e1dcd73793104c9b66e6c1f12 /plugins/dfsound/spu.c
parente424c297b7b714cf2f25582cf9b4fc30cba5599f (diff)
downloadpcsx_rearmed-636462080c6b984993d7427b5d7688a362e45c2f.tar.gz
pcsx_rearmed-636462080c6b984993d7427b5d7688a362e45c2f.tar.bz2
pcsx_rearmed-636462080c6b984993d7427b5d7688a362e45c2f.zip
updated gaussian interpolation filter
the previous gaussian filter was pretty old and inaccurate, the new filter was taken from the updated peops sound plugin 1.10b.
Diffstat (limited to 'plugins/dfsound/spu.c')
-rw-r--r--plugins/dfsound/spu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c
index 0058ad2..a64927e 100644
--- a/plugins/dfsound/spu.c
+++ b/plugins/dfsound/spu.c
@@ -345,11 +345,11 @@ INLINE int iGetInterpolationVal(int *SB, int sinc, int spos, int fmod_freq)
int vl, vr;int gpos;
vl = (spos >> 6) & ~3;
gpos = SB[28];
- vr=(gauss[vl]*(int)gval0)&~2047;
- vr+=(gauss[vl+1]*gval(1))&~2047;
- vr+=(gauss[vl+2]*gval(2))&~2047;
- vr+=(gauss[vl+3]*gval(3))&~2047;
- fa = vr>>11;
+ vr=(gauss[vl]*(int)gval0) >> 15;
+ vr+=(gauss[vl+1]*gval(1)) >> 15;
+ vr+=(gauss[vl+2]*gval(2)) >> 15;
+ vr+=(gauss[vl+3]*gval(3)) >> 15;
+ fa = vr;
} break;
//--------------------------------------------------//
case 1: // simple interpolation