Use more correct loop point correction
This commit is contained in:
parent
b695192f34
commit
d5d9ca8ce5
2 changed files with 3 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -20,3 +20,4 @@ cmake-build-*/
|
||||||
.ctagsd
|
.ctagsd
|
||||||
*.rej
|
*.rej
|
||||||
.codelite/*.tags
|
.codelite/*.tags
|
||||||
|
*_build
|
||||||
|
|
|
@ -60,14 +60,9 @@ void ZsmBackend::load(const char *filename) {
|
||||||
ZsmCommand cmd = get_command();
|
ZsmCommand cmd = get_command();
|
||||||
size_t cur_pos = file->get_pos();
|
size_t cur_pos = file->get_pos();
|
||||||
if (cur_pos >= this->loop_point && this->loop_pos < 0) {
|
if (cur_pos >= this->loop_point && this->loop_pos < 0) {
|
||||||
if (cur_pos > this->loop_point) {
|
|
||||||
this->loop_point = prev_pos;
|
|
||||||
loop_pos = prev_time;
|
|
||||||
} else {
|
|
||||||
loop_pos = time;
|
loop_pos = time;
|
||||||
this->loop_point = cur_pos;
|
this->loop_point = cur_pos;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (cmd.id == ZsmEOF) {
|
if (cmd.id == ZsmEOF) {
|
||||||
break;
|
break;
|
||||||
} else if (cmd.id == Delay) {
|
} else if (cmd.id == Delay) {
|
||||||
|
|
Loading…
Reference in a new issue