QSound: fix ADPCM

I guess you can say it's complete
This commit is contained in:
tildearrow 2022-12-29 03:31:26 -05:00
parent 7fa5fecd38
commit 89995a02be
1 changed files with 5 additions and 2 deletions

View File

@ -323,14 +323,14 @@ void DivPlatformQSound::tick(bool sysTick) {
if (i<16) {
qsound_end = offPCM[chan[i].sample] + length + 15;
} else {
qsound_end = offBS[chan[i].sample] + length + 15;
qsound_end = offBS[chan[i].sample] + (length>>1) + 15;
}
qsound_loop = 15;
} else {
if (i<16) {
qsound_end = offPCM[chan[i].sample] + length;
} else {
qsound_end = offBS[chan[i].sample] + length;
qsound_end = offBS[chan[i].sample] + (length>>1);
}
qsound_loop = length - loopStart;
}
@ -428,6 +428,9 @@ void DivPlatformQSound::tick(bool sysTick) {
} else {
rWrite(q1a_vol_map[i-16],0);
rWrite(Q1A_KEYON+(i-16),0);
rWrite(q1a_end_map[i-16], 1);
rWrite(q1a_start_map[i-16], 0);
rWrite(Q1A_KEYON+(i-16),1);
}
} else if (chan[i].active) {
//logV("ch %d frequency set to %04x, off=%f, note=%d, %04x!",i,chan[i].freq,off,chan[i].note,QS_NOTE_FREQUENCY(chan[i].note));