parent
ed903c6e0a
commit
79167c382f
4 changed files with 49 additions and 1 deletions
|
|
@ -1655,6 +1655,7 @@ void DivEngine::playSub(bool preserveDrift, int goalRow) {
|
|||
ticks=1;
|
||||
tempoAccum=0;
|
||||
totalTicks=0;
|
||||
totalTicksOff=0;
|
||||
totalSeconds=0;
|
||||
totalTicksR=0;
|
||||
curMidiClock=0;
|
||||
|
|
@ -3726,6 +3727,7 @@ void DivEngine::quitDispatch() {
|
|||
changeOrd=-1;
|
||||
changePos=0;
|
||||
totalTicks=0;
|
||||
totalTicksOff=0;
|
||||
totalSeconds=0;
|
||||
totalTicksR=0;
|
||||
curMidiClock=0;
|
||||
|
|
|
|||
|
|
@ -487,6 +487,7 @@ class DivEngine {
|
|||
double midiTimeDrift;
|
||||
int stepPlay;
|
||||
int changeOrd, changePos, totalSeconds, totalTicks, totalTicksR, curMidiClock, curMidiTime, totalCmds, lastCmds, cmdsPerSecond, globalPitch;
|
||||
double totalTicksOff;
|
||||
int curMidiTimePiece, curMidiTimeCode;
|
||||
unsigned char extValue, pendingMetroTick;
|
||||
DivGroovePattern speeds;
|
||||
|
|
@ -1451,6 +1452,7 @@ class DivEngine {
|
|||
lastCmds(0),
|
||||
cmdsPerSecond(0),
|
||||
globalPitch(0),
|
||||
totalTicksOff(0.0),
|
||||
curMidiTimePiece(0),
|
||||
curMidiTimeCode(0),
|
||||
extValue(0),
|
||||
|
|
|
|||
|
|
@ -2000,8 +2000,17 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
if (!freelance) {
|
||||
if (stepPlay!=1) {
|
||||
if (!noAccum) {
|
||||
double dt=divider*tickMult;
|
||||
if (skipping) {
|
||||
dt*=(double)virtualTempoN/(double)MAX(1,virtualTempoD);
|
||||
}
|
||||
totalTicksR++;
|
||||
totalTicks+=1000000/(divider*tickMult);
|
||||
totalTicks+=1000000/dt;
|
||||
totalTicksOff+=fmod(1000000.0,dt);
|
||||
while (totalTicksOff>=dt) {
|
||||
totalTicksOff-=dt;
|
||||
totalTicks++;
|
||||
}
|
||||
}
|
||||
if (totalTicks>=1000000) {
|
||||
totalTicks-=1000000;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue