Re: [hatari-devel] DMA sound and Falcon

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


Le 18/09/2016 à 05:04, Thomas Huth a écrit :
Am Mon, 12 Sep 2016 18:17:18 +0200
schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:
[...]
I fixed falcon's crossbar to keep a constant sound rate when changing
CPU freq at 8 MHz or 32 MHz.

What is interesting is that if you change cpu freq while playing a
sound in "compatible STE dma mode" (for example between 16,8,16,8,...)
the sound will sometimes be noisy, then it will be clear again, or it
will stay noisy all the time and so on.

This randomness really looks to me as if some variables are
overflowing or are not correctly reset when computing the "steps" to
convert from the requested Falcon sound freq to the host sound freq.

Not sure if it is related, but I just ran Hatari through valgrind and
it complained about some unitialized variables in the sound subsystem.
I finally tracked the problem down to SDL_OpenAudio: It behaves
slightly differently with SDL2 than with SDL1.2 - it does not
initialize the desiredAudioSpec.size field anymore, so our
SoundBufferSize contained random values. I fixed that problem now, so if
you've got some spare minutes, maybe you could try your test again to
see if there's a difference?

Hi

always nice to fix uninitialized values, but in this specific case, I don't think the "noisy" output is related to this. I can reproduce it randomly by running a test program several times and if I save the memory state and restore it, then the noise is still there.

So this really looks like sthg specific to crossbar.c, I didn't have time yet to debug it completely.

Nicolas




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