diff --git a/builds/genesis_plus_gx_libretro.dll b/builds/genesis_plus_gx_libretro.dll index 8fa5e10..0f0398e 100644 Binary files a/builds/genesis_plus_gx_libretro.dll and b/builds/genesis_plus_gx_libretro.dll differ diff --git a/builds/genplus_cube.dol b/builds/genplus_cube.dol index a109a3d..472a5a8 100644 Binary files a/builds/genplus_cube.dol and b/builds/genplus_cube.dol differ diff --git a/builds/genplus_wii.dol b/builds/genplus_wii.dol index 46be82d..0404f67 100644 Binary files a/builds/genplus_wii.dol and b/builds/genplus_wii.dol differ diff --git a/core/cd_hw/cdd.c b/core/cd_hw/cdd.c index f0cf714..df7e22d 100644 --- a/core/cd_hw/cdd.c +++ b/core/cd_hw/cdd.c @@ -263,7 +263,7 @@ int cdd_context_load(uint8 *state) ov_open(cdd.toc.tracks[cdd.index].fd,&cdd.toc.tracks[cdd.index].vf,0,0); #endif /* VORBIS AUDIO track */ - ov_pcm_seek(&cdd.toc.tracks[cdd.index].vf, (lba - cdd.toc.tracks[cdd.index].start) * 588 - cdd.toc.tracks[cdd.index].offset); + ov_pcm_seek(&cdd.toc.tracks[cdd.index].vf, (lba * 588) - cdd.toc.tracks[cdd.index].offset); } #endif else if (cdd.toc.tracks[cdd.index].fd) @@ -742,6 +742,9 @@ int cdd_load(char *filename, char *header) break; } + /* initialize file read offset for current track */ + cdd.toc.tracks[cdd.toc.last].offset = cdd.toc.tracks[cdd.toc.last].start * 588; + /* auto-detect PAUSE within audio files */ ov_pcm_seek(&cdd.toc.tracks[cdd.toc.last].vf, 100 * 588); #if defined(USE_LIBVORBIS) @@ -1199,7 +1202,7 @@ void cdd_update(void) /* VORBIS file need to be opened first */ ov_open(cdd.toc.tracks[cdd.index].fd,&cdd.toc.tracks[cdd.index].vf,0,0); #endif - ov_pcm_seek(&cdd.toc.tracks[cdd.index].vf, -cdd.toc.tracks[cdd.index].offset); + ov_pcm_seek(&cdd.toc.tracks[cdd.index].vf, (cdd.toc.tracks[cdd.index].start * 588) - cdd.toc.tracks[cdd.index].offset); } else #endif @@ -1298,7 +1301,7 @@ void cdd_update(void) } #endif /* VORBIS AUDIO track */ - ov_pcm_seek(&cdd.toc.tracks[cdd.index].vf, (cdd.lba - cdd.toc.tracks[cdd.index].start) * 588 - cdd.toc.tracks[cdd.index].offset); + ov_pcm_seek(&cdd.toc.tracks[cdd.index].vf, (cdd.lba * 588) - cdd.toc.tracks[cdd.index].offset); } #endif else if (cdd.toc.tracks[cdd.index].fd) @@ -1517,7 +1520,7 @@ void cdd_process(void) else if (cdd.toc.tracks[index].vf.seekable) { /* VORBIS AUDIO track */ - ov_pcm_seek(&cdd.toc.tracks[index].vf, (lba - cdd.toc.tracks[index].start) * 588 - cdd.toc.tracks[index].offset); + ov_pcm_seek(&cdd.toc.tracks[index].vf, (lba * 588) - cdd.toc.tracks[index].offset); } #endif else if (cdd.toc.tracks[index].fd) @@ -1609,7 +1612,7 @@ void cdd_process(void) else if (cdd.toc.tracks[index].vf.seekable) { /* VORBIS AUDIO track */ - ov_pcm_seek(&cdd.toc.tracks[index].vf, (lba - cdd.toc.tracks[index].start) * 588 - cdd.toc.tracks[index].offset); + ov_pcm_seek(&cdd.toc.tracks[index].vf, (lba * 588) - cdd.toc.tracks[index].offset); } #endif else if (cdd.toc.tracks[index].fd)