[hatari-devel] Falcon left-right sound swapper bug? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: [hatari-devel] Falcon left-right sound swapper bug?
- From: David Savinkoff <dsavnkff@xxxxxxxxx>
- Date: Tue, 15 Apr 2014 18:58:12 -0600 (MDT)
- Thread-index: y/7D9ZSsbSE/scBO4co3L4fUDb1btw==
- Thread-topic: Falcon left-right sound swapper bug?
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