one more pitch calc fix

This commit is contained in:
tildearrow 2022-04-25 11:52:05 -05:00
parent ed6820ac46
commit 17cf657f6a
1 changed files with 6 additions and 1 deletions

View File

@ -894,7 +894,12 @@ unsigned short DivEngine::calcBaseFreqFNumBlock(double clock, double divider, in
if (block>7) block=7; if (block>7) block=7;
bf>>=block; bf>>=block;
if (bf<0) bf=0; if (bf<0) bf=0;
if (bf>1288) { // apparently octave boundary // octave boundaries
while (bf>0 && bf<644 && block>0) {
bf<<=1;
block--;
}
if (bf>1288) {
while (block<7) { while (block<7) {
bf>>=1; bf>>=1;
block++; block++;