mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 14:33:01 +00:00
VGM export: fix virtual tempo resulting in no loop
This commit is contained in:
parent
0ecca80c4e
commit
7fe2a99112
2 changed files with 10 additions and 8 deletions
|
@ -2418,8 +2418,10 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version, bool p
|
|||
}
|
||||
while (!done) {
|
||||
if (loopPos==-1) {
|
||||
if (loopOrder==curOrder && loopRow==curRow && ticks==1) {
|
||||
writeLoop=true;
|
||||
if (loopOrder==curOrder && loopRow==curRow) {
|
||||
if ((ticks-((tempoAccum+curSubSong->virtualTempoN)/curSubSong->virtualTempoD))<=0) {
|
||||
writeLoop=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
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) {
|
||||
if (writePos==(readPos-1)) {
|
||||
logW("queue overflow!");
|
||||
//logW("queue overflow!");
|
||||
return false;
|
||||
}
|
||||
if (writePos==items-1 && readPos==0) {
|
||||
logW("queue overflow!");
|
||||
//logW("queue overflow!");
|
||||
return false;
|
||||
}
|
||||
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) {
|
||||
if (writePos==(readPos-1)) {
|
||||
logW("queue overflow!");
|
||||
//logW("queue overflow!");
|
||||
return false;
|
||||
}
|
||||
if (writePos==items-1 && readPos==0) {
|
||||
logW("queue overflow!");
|
||||
//logW("queue overflow!");
|
||||
return false;
|
||||
}
|
||||
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) {
|
||||
if (readPos==(writePos+1)) {
|
||||
logW("stack overflow!");
|
||||
//logW("stack overflow!");
|
||||
return false;
|
||||
}
|
||||
if (readPos==0 && writePos==items-1) {
|
||||
logW("stack overflow!");
|
||||
//logW("stack overflow!");
|
||||
return false;
|
||||
}
|
||||
if (readPos>0) {
|
||||
|
|
Loading…
Reference in a new issue