YM2612: fix several sample bugs
This commit is contained in:
parent
c84ff399d9
commit
832df58929
3 changed files with 74 additions and 19 deletions
|
|
@ -894,7 +894,15 @@ unsigned short DivEngine::calcBaseFreqFNumBlock(double clock, double divider, in
|
|||
if (block>7) block=7;
|
||||
bf>>=block;
|
||||
if (bf<0) bf=0;
|
||||
if (bf>((1<<bits)-1)) bf=(1<<bits)-1;
|
||||
if (bf>1288) { // apparently octave boundary
|
||||
while (block<7) {
|
||||
bf>>=1;
|
||||
block++;
|
||||
}
|
||||
if (bf>((1<<bits)-1)) {
|
||||
bf=(1<<bits)-1;
|
||||
}
|
||||
}
|
||||
return bf|(block<<bits);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue