only output playback status in console mode
This commit is contained in:
parent
d4046de2e1
commit
beceefd34b
5 changed files with 45 additions and 15 deletions
|
|
@ -1484,6 +1484,10 @@ void DivEngine::setView(DivStatusView which) {
|
|||
view=which;
|
||||
}
|
||||
|
||||
void DivEngine::setConsoleMode(bool enable) {
|
||||
consoleMode=enable;
|
||||
}
|
||||
|
||||
void DivEngine::initDispatch() {
|
||||
if (dispatch!=NULL) return;
|
||||
isBusy.lock();
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ class DivEngine {
|
|||
bool playing;
|
||||
bool speedAB;
|
||||
bool endOfSong;
|
||||
bool consoleMode;
|
||||
int ticks, cycles, curRow, curOrder, remainingLoops, nextSpeed, clockDrift;
|
||||
int changeOrd, changePos, totalTicks, totalCmds, lastCmds, cmdsPerSecond;
|
||||
DivStatusView view;
|
||||
|
|
@ -208,6 +209,9 @@ class DivEngine {
|
|||
// set the view mode.
|
||||
void setView(DivStatusView which);
|
||||
|
||||
// set the console mode.
|
||||
void setConsoleMode(bool enable);
|
||||
|
||||
// public render samples
|
||||
void renderSamplesP();
|
||||
|
||||
|
|
@ -233,6 +237,7 @@ class DivEngine {
|
|||
playing(false),
|
||||
speedAB(false),
|
||||
endOfSong(false),
|
||||
consoleMode(false),
|
||||
ticks(0),
|
||||
cycles(0),
|
||||
curRow(0),
|
||||
|
|
|
|||
|
|
@ -505,7 +505,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
}
|
||||
break;
|
||||
case 0xee: // external command
|
||||
printf("\x1b[1;36m%d: extern command %d\x1b[m\n",i,effectVal);
|
||||
//printf("\x1b[1;36m%d: extern command %d\x1b[m\n",i,effectVal);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -772,7 +772,7 @@ bool DivEngine::nextTick() {
|
|||
} else {
|
||||
hz=50;
|
||||
}
|
||||
fprintf(stderr,"\x1b[2K> %d:%.2d:%.2d.%.2d %.2x/%.2x:%.3d/%.3d %4dcmd/s\x1b[G",totalTicks/(hz*3600),(totalTicks/(hz*60))%60,(totalTicks/hz)%60,totalTicks%hz,curOrder,song.ordersLen,curRow,song.patLen,cmdsPerSecond);
|
||||
if (consoleMode) fprintf(stderr,"\x1b[2K> %d:%.2d:%.2d.%.2d %.2x/%.2x:%.3d/%.3d %4dcmd/s\x1b[G",totalTicks/(hz*3600),(totalTicks/(hz*60))%60,(totalTicks/hz)%60,totalTicks%hz,curOrder,song.ordersLen,curRow,song.patLen,cmdsPerSecond);
|
||||
|
||||
if ((totalTicks%hz)==0) {
|
||||
cmdsPerSecond=totalCmds-lastCmds;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue