X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fdfsound%2Fspu.c;h=3b4c051df711b3206bbb534c2d0842510397191f;hb=7a8d521fba9c86ae7b51369ce061bf63112b745f;hp=f4426abe6574473dd95693c12bcd9b56eb92adba;hpb=3113a160828f9353715e4b8cc1041d9c86162df2;p=pcsx_rearmed.git diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index f4426abe..3b4c051d 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -348,11 +348,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 @@ -1193,13 +1193,13 @@ static void do_samples_finish(int *SSumLR, int ns_to, for (ns = 0; ns < ns_to * 2; ) { d = SSumLR[ns]; SSumLR[ns] = 0; - d = d * vol_l >> 15; + d = d * vol_l >> 14; ssat32_to_16(d); *spu.pS++ = d; ns++; d = SSumLR[ns]; SSumLR[ns] = 0; - d = d * vol_r >> 15; + d = d * vol_r >> 14; ssat32_to_16(d); *spu.pS++ = d; ns++;