ZX beeper: fix frequency range
This commit is contained in:
parent
ae007b3829
commit
169929ff9b
|
@ -90,7 +90,7 @@ void DivPlatformZXBeeper::tick(bool sysTick) {
|
|||
if (chan[i].std.pitch.had) {
|
||||
if (chan[i].std.pitch.mode) {
|
||||
chan[i].pitch2+=chan[i].std.pitch.val;
|
||||
CLAMP_VAR(chan[i].pitch2,-32768,32767);
|
||||
CLAMP_VAR(chan[i].pitch2,-65535,65535);
|
||||
} else {
|
||||
chan[i].pitch2=chan[i].std.pitch.val;
|
||||
}
|
||||
|
@ -99,6 +99,7 @@ void DivPlatformZXBeeper::tick(bool sysTick) {
|
|||
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
||||
if (chan[i].active) {
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,2,chan[i].pitch2,chipClock,CHIP_FREQBASE);
|
||||
if (chan[i].freq<0) chan[i].freq=0;
|
||||
if (chan[i].freq>65535) chan[i].freq=65535;
|
||||
}
|
||||
if (chan[i].keyOn) {
|
||||
|
|
Loading…
Reference in New Issue