implement panning macro

except for QSound
This commit is contained in:
tildearrow 2022-04-17 14:15:57 -05:00
parent 5e7a4eae16
commit fc8a130c71
13 changed files with 121 additions and 5 deletions

View file

@ -173,6 +173,17 @@ void DivPlatformSwan::tick(bool sysTick) {
chan[i].ws.changeWave1(chan[i].wave);
}
}
if (chan[i].std.panL.had) {
chan[i].pan&=0x0f;
chan[i].pan|=(chan[i].std.panL.val&15)<<4;
}
if (chan[i].std.panR.had) {
chan[i].pan&=0xf0;
chan[i].pan|=chan[i].std.panR.val&15;
}
if (chan[i].std.panL.had || chan[i].std.panR.had) {
calcAndWriteOutVol(i,chan[i].std.vol.will?chan[i].std.vol.val:15);
}
if (chan[i].std.pitch.had) {
chan[i].freqChanged=true;
}