1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-04 18:29:40 +00:00

Inserts an additional reload.

This commit is contained in:
Thomas Harte 2021-12-05 17:47:12 -05:00
parent a5fe1e4259
commit f02a241249

View File

@ -482,12 +482,14 @@ void Audio::Channel::decrement_length() {
// if (not lenfin) and AUDxON and AUDxDAT, then lencount
// if lenfin and AUDxON and AUDxDAT, then intreq2
if(dma_enabled && !wants_data) {
if(length_counter == 1) {
-- length_counter;
if(!length_counter) {
length_counter = length;
will_request_interrupt = true;
should_reload_address = true; // This feels logical to me; it's a bit
// of a stab in the dark though.
}
--length_counter;
}
}