[hatari-devel] Slow sound buffer

Nicolas Pomarède npomarede at corp.free.fr
Tue Jan 18 23:28:55 CET 2011


Le 18/01/2011 23:20, David Savinkoff a écrit :

> Hi,
>
> Main_WaitOnVbl() waits on each emulated VBL to synchronize the real
> time with the emulated ST. This now has less rounding error but
> probably doesn't make a difference unless it is taken advantage of.
>
> Your question about dma sound raised some issues with:
> #define SAMPLES_PER_FRAME  ((nAudioFrequency+35)/nScreenRefreshRate)
> Furthermore, I changed it (in sound.c) to:
> #define...((nAudioFrequency + d_nAudioFrequency)/nScreenRefreshRate)
> I have to use a different variable to do the frequency offset.
>
> It looks like nAudioFrequency+35 is meant to give more samples per
> frame at lower sample frequencies, but doing this will mess with
> FreqRatio in dmaSnd.c
>
> David

OK, that's what I thought. Also, can you tell more about the /86 and 
/-86 you use ? What is the origin of this value of 86 ?

Nicolas




More information about the hatari-devel mailing list