Previous 15994 Revisions Next

r7957 Saturday 1st May, 2010 at 21:09:28 UTC by R. Belmont
SNES: gauss[511] is nothing like gauss[-1]. [R. Belmont]
[src/mame/audio]snes_snd.c

src/mame/audio/snes_snd.c
r7956r7957
126126static const int *const G1 = &gauss[256];
127127static const int *const G2 = &gauss[512];
128128static const int *const G3 = &gauss[255];
129static const int *const G4 = &gauss[511];
129static const int *const G4 = &gauss[0];
130130
131131static const int        mask = 0xFF;
132132
r7956r7957
588588            the sum of the products of each input sample point with the value
589589            of the bell-curve corresponding to that point. */
590590         vl  = vp->mixfrac >> 4;
591         vr  = ((G4[-vl] * vp->sampbuf[vp->sampptr]) >> 11 ) & ~1;
591         vr  = ((G4[-vl-1] * vp->sampbuf[vp->sampptr]) >> 11 ) & ~1;
592592         vr += ((G3[-vl] * vp->sampbuf[(vp->sampptr + 1) & 3]) >> 11) & ~1;
593593         vr += ((G2[vl] * vp->sampbuf[(vp->sampptr + 2) & 3]) >> 11 ) & ~1;
594594
r7956r7957
614614            vp->sampbuf[(vp->sampptr + 2) & 3],
615615            G3[-vl],
616616            vp->sampbuf[(vp->sampptr + 1) & 3],
617            G4[-vl],
617            G4[-vl-1],
618618            vp->sampbuf[vp->sampptr],
619619            outx);
620620#endif

Previous 15994 Revisions Next


© 1998-2018 The MESS Team