VGM export: fix virtual tempo resulting in no loop
This commit is contained in:
parent
0ecca80c4e
commit
7fe2a99112
|
@ -2418,8 +2418,10 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version, bool p
|
||||||
}
|
}
|
||||||
while (!done) {
|
while (!done) {
|
||||||
if (loopPos==-1) {
|
if (loopPos==-1) {
|
||||||
if (loopOrder==curOrder && loopRow==curRow && ticks==1) {
|
if (loopOrder==curOrder && loopRow==curRow) {
|
||||||
writeLoop=true;
|
if ((ticks-((tempoAccum+curSubSong->virtualTempoN)/curSubSong->virtualTempoD))<=0) {
|
||||||
|
writeLoop=true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
songTick++;
|
songTick++;
|
||||||
|
|
|
@ -101,11 +101,11 @@ template <typename T, size_t items> bool FixedQueue<T,items>::pop() {
|
||||||
|
|
||||||
template <typename T, size_t items> bool FixedQueue<T,items>::push(const T& item) {
|
template <typename T, size_t items> bool FixedQueue<T,items>::push(const T& item) {
|
||||||
if (writePos==(readPos-1)) {
|
if (writePos==(readPos-1)) {
|
||||||
logW("queue overflow!");
|
//logW("queue overflow!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (writePos==items-1 && readPos==0) {
|
if (writePos==items-1 && readPos==0) {
|
||||||
logW("queue overflow!");
|
//logW("queue overflow!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
data[writePos]=item;
|
data[writePos]=item;
|
||||||
|
@ -121,11 +121,11 @@ template <typename T, size_t items> bool FixedQueue<T,items>::pop_front() {
|
||||||
|
|
||||||
template <typename T, size_t items> bool FixedQueue<T,items>::push_back(const T& item) {
|
template <typename T, size_t items> bool FixedQueue<T,items>::push_back(const T& item) {
|
||||||
if (writePos==(readPos-1)) {
|
if (writePos==(readPos-1)) {
|
||||||
logW("queue overflow!");
|
//logW("queue overflow!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (writePos==items-1 && readPos==0) {
|
if (writePos==items-1 && readPos==0) {
|
||||||
logW("queue overflow!");
|
//logW("queue overflow!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
data[writePos]=item;
|
data[writePos]=item;
|
||||||
|
@ -145,11 +145,11 @@ template <typename T, size_t items> bool FixedQueue<T,items>::pop_back() {
|
||||||
|
|
||||||
template <typename T, size_t items> bool FixedQueue<T,items>::push_front(const T& item) {
|
template <typename T, size_t items> bool FixedQueue<T,items>::push_front(const T& item) {
|
||||||
if (readPos==(writePos+1)) {
|
if (readPos==(writePos+1)) {
|
||||||
logW("stack overflow!");
|
//logW("stack overflow!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (readPos==0 && writePos==items-1) {
|
if (readPos==0 && writePos==items-1) {
|
||||||
logW("stack overflow!");
|
//logW("stack overflow!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (readPos>0) {
|
if (readPos>0) {
|
||||||
|
|
Loading…
Reference in a new issue