[hatari-devel] Slow sound buffer

David Savinkoff dsavnkff at telus.net
Sat Jan 22 23:51:10 CET 2011


Hi,

In main.c:

void Main_WaitOnVbl(void)
{

(1)
I'm wondering if 4 in 4*nFrameDuration would best be set to equal
the Frame Skip value, notwithstanding some minimum value.

	/* Do not wait if we are in fast forward mode or if we are totally out of sync */
	if (ConfigureParams.System.bFastForward == true
	        || abs(nFrameDelay) > 4*nFrameDuration)


(2)
Correct the following code in sound-sync2.diff (appears twice) from:
	if (nFrameDelay <= -FRAME_TICK_FACTOR*8192)
		nFrameDelay += FRAME_TICK_FACTOR*16384;
	else
	if (nFrameDelay >= FRAME_TICK_FACTOR*8191)
		nFrameDelay -= FRAME_TICK_FACTOR*16384;

To this:
	if (nFrameDelay < -FRAME_TICK_FACTOR*16384/2)
		nFrameDelay += FRAME_TICK_FACTOR*16384;
	else
	if (nFrameDelay >= FRAME_TICK_FACTOR*16384/2)
		nFrameDelay -= FRAME_TICK_FACTOR*16384;

Sincerely,
David



More information about the hatari-devel mailing list