[hatari-devel] Cracks in the sound (YM+DMA)

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

dma @ atari-forum noted sound distortion in Hatari:
http://www.atari-forum.com/viewtopic.php?f=51&t=24669&sid=f08b16bc7408e46efabdcc0459add885#p226677

I found and solved the problem. YM + DMA sound samples
exceeded 16 bits at line 549 in dmaSnd.c (see code):

/* DMA and (YM2149 0 dB) mixing */
MixBuffer[nBufIdx][0] = MixBuffer[nBufIdx][0] + dma.FrameLeft * -((256*3/4)/2)/4;

A solution is to center the YM sound table with sound.c.overflow.diff
A side effect of centering the sound table is an audible click when
cold-starting hatari (power cycling on a real Atari).

I also made a patch to do efficient clipping instead of overflow for
LMC1992 distortion.

David

Attachment: sound.c.overflow.diff
Description: Binary data

Attachment: dmaSnd.c.saturation.diff
Description: Binary data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/