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

[ Thread Index | Date Index | More Archives ]

On 17/03/2013 22:28, David Savinkoff wrote:


This patch works well, but is incompatible with older snapshots.

Hatari plays DMA sound at the same level as before (unless you
use an old snapshot). New snapshots made with the newly patched
version will work properly with the newly patched version.

The problem is with using an old memory snapshot as the old gain
is used (in your case: 1.0/(65536.0*65536.0) ) which makes the
gain half as much as required.

If you did the snapshot with the patched version (the other way
around), you would get double the volume: 2.0/(65536.0*65536.0)

As can be seen in the preliminary observations, the patch was
double checked.

Note that DmaSnd_Init_Bass_and_Treble_Tables() can be executed
after all MemorySnapShot are restored, thus, overwriting the
erroneous gain from old snapshots. If this were done then
MemorySnapShot_Store(&lmc1992, sizeof(lmc1992));
would not be necessary. (see dmaSnd.c)


you're right, I tried the same snapshot with the 2 different Hatari version, but I didn't notice lmc1992 was part of the snapshot, which as you say explain the x2 factor in my tests.

I tested again with 2 different snapshots corresponding to the 2 Hatari version, and volume is indeed the same.

I don't think it's necessary to reinit lmc1992 after restoring a snapshot, as long as such changes happen during the dev version, it's OK if snapshot are not compatible with each others.

So, case closed, sorry for the noise and the wasted time :)


Mail converted by MHonArc 2.6.19+