VGM export: fix it under low-latency mode
This commit is contained in:
parent
b48a2368be
commit
6b294933bc
|
@ -271,7 +271,7 @@ class DivEngine {
|
||||||
void nextRow();
|
void nextRow();
|
||||||
void performVGMWrite(SafeWriter* w, DivSystem sys, DivRegWrite& write, int streamOff, double* loopTimer, double* loopFreq, int* loopSample, bool isSecond);
|
void performVGMWrite(SafeWriter* w, DivSystem sys, DivRegWrite& write, int streamOff, double* loopTimer, double* loopFreq, int* loopSample, bool isSecond);
|
||||||
// returns true if end of song.
|
// returns true if end of song.
|
||||||
bool nextTick(bool noAccum=false);
|
bool nextTick(bool noAccum=false, bool inhibitLowLat=false);
|
||||||
bool perSystemEffect(int ch, unsigned char effect, unsigned char effectVal);
|
bool perSystemEffect(int ch, unsigned char effect, unsigned char effectVal);
|
||||||
bool perSystemPostEffect(int ch, unsigned char effect, unsigned char effectVal);
|
bool perSystemPostEffect(int ch, unsigned char effect, unsigned char effectVal);
|
||||||
void recalcChans();
|
void recalcChans();
|
||||||
|
|
|
@ -1472,11 +1472,11 @@ void DivEngine::nextRow() {
|
||||||
firstTick=true;
|
firstTick=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivEngine::nextTick(bool noAccum) {
|
bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
||||||
bool ret=false;
|
bool ret=false;
|
||||||
if (divider<10) divider=10;
|
if (divider<10) divider=10;
|
||||||
|
|
||||||
if (lowLatency && !skipping) {
|
if (lowLatency && !skipping && !inhibitLowLat) {
|
||||||
tickMult=1000/divider;
|
tickMult=1000/divider;
|
||||||
if (tickMult<1) tickMult=1;
|
if (tickMult<1) tickMult=1;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1384,7 +1384,7 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version) {
|
||||||
writeLoop=true;
|
writeLoop=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nextTick() || !playing) {
|
if (nextTick(false,true) || !playing) {
|
||||||
done=true;
|
done=true;
|
||||||
if (!loop) {
|
if (!loop) {
|
||||||
for (int i=0; i<song.systemLen; i++) {
|
for (int i=0; i<song.systemLen; i++) {
|
||||||
|
|
Loading…
Reference in a new issue