PCE: remove some sample playback clicking
This commit is contained in:
parent
3e70ed6d3e
commit
6ec9cceb09
2 changed files with 10 additions and 2 deletions
|
|
@ -133,6 +133,10 @@ void DivPlatformPCE::acquire(short* bufL, short* bufR, size_t start, size_t len)
|
|||
}
|
||||
|
||||
void DivPlatformPCE::updateWave(int ch) {
|
||||
if (chan[ch].pcm) {
|
||||
chan[ch].deferredWaveUpdate=true;
|
||||
return;
|
||||
}
|
||||
chWrite(ch,0x04,0x5f);
|
||||
chWrite(ch,0x04,0x1f);
|
||||
for (int i=0; i<32; i++) {
|
||||
|
|
@ -142,6 +146,9 @@ void DivPlatformPCE::updateWave(int ch) {
|
|||
if (chan[ch].active) {
|
||||
chWrite(ch,0x04,0x80|chan[ch].outVol);
|
||||
}
|
||||
if (chan[ch].deferredWaveUpdate) {
|
||||
chan[ch].deferredWaveUpdate=false;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: in octave 6 the noise table changes to a tonal one
|
||||
|
|
@ -227,7 +234,7 @@ void DivPlatformPCE::tick(bool sysTick) {
|
|||
chan[i].freqChanged=true;
|
||||
}
|
||||
if (chan[i].active) {
|
||||
if (chan[i].ws.tick() || (chan[i].std.phaseReset.had && chan[i].std.phaseReset.val==1)) {
|
||||
if (chan[i].ws.tick() || (chan[i].std.phaseReset.had && chan[i].std.phaseReset.val==1) || chan[i].deferredWaveUpdate) {
|
||||
updateWave(i);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue