add clock drift for exact tempo

This commit is contained in:
tildearrow 2021-12-08 02:57:41 -05:00
parent db2bfb8aa3
commit 9362cfa481
4 changed files with 27 additions and 9 deletions

View file

@ -66,7 +66,7 @@ class DivEngine {
bool playing;
bool speedAB;
bool endOfSong;
int ticks, cycles, curRow, curOrder, remainingLoops, nextSpeed;
int ticks, cycles, curRow, curOrder, remainingLoops, nextSpeed, clockDrift;
int changeOrd, changePos, totalTicks, totalCmds, lastCmds, cmdsPerSecond;
DivStatusView view;
DivChannelState chan[17];
@ -80,6 +80,8 @@ class DivEngine {
short* bbIn[2];
short* bbOut[2];
size_t totalProcessed;
int dispatchCmd(DivCommand c);
void processRow(int i, bool afterDelay);
void nextOrder();
@ -126,6 +128,7 @@ class DivEngine {
curOrder(0),
remainingLoops(-1),
nextSpeed(3),
clockDrift(0),
changeOrd(-1),
changePos(0),
totalTicks(0),