mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 04:55:13 +00:00
parent
9851f5cc87
commit
443535a54c
1 changed files with 3 additions and 1 deletions
|
@ -1564,8 +1564,10 @@ void DivEngine::runMidiClock(int totalCycles) {
|
|||
if (speedSum<1.0) speedSum=1.0;
|
||||
if (vD<1) vD=1;
|
||||
double bpm=((24.0*divider)/(timeBase*hl*speedSum))*(double)curSubSong->virtualTempoN/vD;
|
||||
if (bpm<1.0) bpm=1.0;
|
||||
int increment=got.rate*pow(2,MASTER_CLOCK_PREC)/(bpm);
|
||||
|
||||
midiClockCycles+=got.rate*pow(2,MASTER_CLOCK_PREC)/(bpm);
|
||||
midiClockCycles+=increment;
|
||||
midiClockDrift+=fmod(got.rate*pow(2,MASTER_CLOCK_PREC),(double)(bpm));
|
||||
if (midiClockDrift>=(bpm)) {
|
||||
midiClockDrift-=(bpm);
|
||||
|
|
Loading…
Reference in a new issue