diff --git a/.codelite/neko-player-someone.tags b/.codelite/neko-player-someone.tags deleted file mode 100644 index db051cd..0000000 Binary files a/.codelite/neko-player-someone.tags and /dev/null differ diff --git a/.gitignore b/.gitignore index 6657670..9157dab 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ wasm-rt/wasmer cmake-build-*/ .ctagsd *.rej +.codelite/*.tags diff --git a/backends/playback/zsm/zsm_backend.cpp b/backends/playback/zsm/zsm_backend.cpp index a2f76e1..77784d9 100644 --- a/backends/playback/zsm/zsm_backend.cpp +++ b/backends/playback/zsm/zsm_backend.cpp @@ -52,6 +52,7 @@ void ZsmBackend::load(const char *filename) { while (true) { tmpDelayTicks -= get_delay_per_frame(); if (tmpDelayTicks < 0.0) { + if (file->get_pos() == (size_t)loop_point) loop_pos = time; ZsmCommand cmd = get_command(); if (cmd.id == ZsmEOF) { break; @@ -65,7 +66,7 @@ void ZsmBackend::load(const char *filename) { music_data_len = file->get_pos(); switch_stream(0); loop_end = length; - loop_start = ((double)this->loop_point) / ((double)tick_rate); + loop_start = this->loop_pos; fm_stream = SDL_NewAudioStream(AUDIO_S16SYS, 2, YM_FREQ, AUDIO_S16SYS, 2, PSG_FREQ); DEBUG.writefln("fm_stream: %ld -> %ld", YM_FREQ, PSG_FREQ); }