[hatari-devel] Issues with DMA sound
Per Almered
per at brainfish.net
Sat Aug 15 15:19:09 CEST 2009
> > > Now I am confused completely. I've scaled _down_ the DMA
> > > sound samples by factor two after Anders complained about
> > > them being to loud, see this mail here:
> >
> > To me, it looks like between Hatari v1.2 and v1.3, the DMA output
> > amplitude was divided by 4, which should give a volume change of
> > -12dB. And indeed, the volume change between v1.2 and v1.3
> is 12.1dB,
> > certainly close enough.
>
> That's strange. The changeset that introduced the difference is this
> one:
>
> http://hg.berlios.de/repos/hatari/rev/e27e82952a01
>
> As you can see, the DMA sound samples are just shifted by 7 instead of
8 now, so this > is factor 2, not 4.
Sadly, I'm a fairly crappy coder, and I haven't coded in C at ALL this
century,
but yeah, it looks alright, I guess.
All I can see is the results in the exported .WAV file. You can check it
fairly
easily with any editor that shows you the waveform. In my original data,
before
I scaled it so YM volume $f was -6dB, YM volume $f was -9.5 (both Hatari
versions),
STE DMA volume was -6dB in v1.2 and -18.1 in v1.3.
On my real STE, the original volume for YM $f was -3.5dB and -3.0 for
STE DMA. So
as a quick fix, if you download my test file:
http://brainfish.net/atari/maxymiser/hat_test.snd
and play it back in any SNDH player (it loads fine in maxYMiser 1.29,
and that's
what I used for sampling), then adjust the STE DMA volume so it's
exactly the same
amplitude in the exported .WAV file, that's good enough (if you manage
to get them
EXACTLY the same, that would mean a 0.5dB rror, and that's MILES better
than both
STeem and the Hatari versions I've tried).
For later versions, I'd suggest getting closer to a real STE's volume
curve, feel
free to use my values as a base.
Per.
More information about the hatari-devel
mailing list