Re: [hatari-devel] DMA sound and Falcon

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


Hi,

The sound become noisy after some seconds and then, return to clean after the same amount of time. It seems to be cyclic. clear sound -> degrades -> noisy sound -> becomes better -> clear sound -> ...

Something I never added to the crossbar is that there are two 32 bytes buffers for the sound (in and out).
I've got the schemas somewhere if someone need them.

I know you added 1 little buffer to the Ste DMA that you feed after each hbl, but I don't understand exactly how you did it.

I wish this make sense.


I think I was very careful with the frequencies conversions (int to frac or rounding), but I'm sure your advise and 4 eyes looking can only improve the code. ;)

Regards

Laurent



Le 11/09/2016 à 19:05, Nicolas Pomarède a écrit :
Le 11/09/2016 à 18:54, Laurent Sallafranque a écrit :
Hi,

Thanks Nicolas, That's fixed now.

I've noticed that sometimes sound unsynchronize and then later,
resynchronize (this generates noise and cracles in the sound).
With 1.7, if the sound was correct at the beginning, it stayed correct,
and if it was noisy at the beginning, it stayed noisy.


I never really had a look at the Falcon part, as I don't know the hardware that much (never had a Falcon or coded for it). But I remember we had some similar problems with STE DMA sound that sometimes sounded wrong and it was fixed by improving the frequency computation (ie the ratio between cpu freq, output freq on the OS and replay freq in emulation)

Maybe some similar changes need to be done in the Falcon part, I will try to isolate this using the simple program you sent me that just play a short sample in "ste dma" compatibilty mode.


For your info, some warnings :


Yes, I'm aware of those :) Will remove them soon, I need to clean some parts of video.c

Nicolas






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