Game Boy: make pitch macro work on noise

This commit is contained in:
tildearrow 2023-01-12 18:10:17 -05:00
parent f2fdeb9df8
commit b074136094
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ void DivPlatformGB::tick(bool sysTick) {
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
if (i==3) { // noise
int ntPos=chan[i].baseFreq;
int ntPos=chan[i].baseFreq+((chan[i].pitch2+64)>>7);
if (ntPos<0) ntPos=0;
if (ntPos>255) ntPos=255;
chan[i].freq=noiseTable[ntPos];