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

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


On 03/03/2013 15:23, Nicolas Pomarède wrote:
On 03/03/2013 05:41, David Savinkoff wrote:
Hi Nicolas,

This patch has sound clipping for LMC1992 saturation distortion
(same code as before for expedience, change it to your liking).
See hunk at line 642 (dmaSnd.c).

This patch also fixes the sound overflow when DMA samples and
YM2149 are summed on the STe.
See all other hunks.

The sound overflow fix incurs no performance penalty because
the YM2149 volume table is scaled by 1/2 in sound.c for the
STe; and the LMC1992 gain is doubled in dmaSnd.c to compensate
afterwards. DMA sound samples are scaled and summed
with 1/2 attenuated YM2149 to avoid overflow. DC filtering
removes the large dc offset before the gain is scaled up by 2.

David


Hi

that's great, thanks for the patch ; I will check it later to head the
difference.

Nicolas



Hello

I applied the patch ; sound seems ok, but despite the comments you added in the source about doubling gain to compensate for halving dma, volume is much lower than before.

For example, try the demo Music Dream II by Phenomena http://pouet.net/prod.php?which=3418 ; it's dma sound only and volume is lower with your latest patch (try to restore a memory snapshot of music dream II with 2 versions of Hatari with/without patch to quickly hear the difference)

Is this expected ?

Nicolas





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