1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-10 08:04:45 +00:00

Keep audio fetches in bounds.

This commit is contained in:
Thomas Harte 2021-12-03 07:16:21 -05:00
parent 6bc5268cbd
commit 57789092c1

View File

@ -34,7 +34,7 @@ bool Audio::advance_dma(int channel) {
return false;
}
set_data(channel, ram_[pointer_[size_t(channel)]]);
set_data(channel, ram_[pointer_[size_t(channel) & ram_mask_]]);
if(channels_[channel].state != Channel::State::WaitingForDummyDMA) {
++pointer_[size_t(channel)];
}