[hatari-devel] Falcon left-right sound swapper bug?

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


Hi,

I looked at line 1772 of /hatari/src/falcon/crossbar.c and found a
possible bug:

static void Crossbar_SendDataToDAC(Sint16 value, Uint16 sample_pos)
{
	Uint16 track = crossbar.track_monitored * 2;

	if (sample_pos == track) {
		/* Left channel */
		dac.buffer_left[dac.writePosition] = value;
	}
	else if (sample_pos == track + 1) {
		/* Right channel */
		dac.buffer_right[dac.writePosition] = value;
/*Bug*/		dac.writePosition = (dac.writePosition + 1) % (DACBUFFER_SIZE);
	}
}

Shouldn't the /*Bug*/ line be After the 'if' statement ?

Sincerely,
David Savinkoff




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