X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=psp%2Fmp3.c;h=af506116bc08b33541234af607f923e1b78a3e03;hb=450dab6fe58cfb6320b3f17211919029be679fa2;hp=db3e39dbfc6e9033a0984b1aa1f9798137ab359b;hpb=93c0d147a19160bcf970edac8d0e27f93537ae8d;p=libpicofe.git diff --git a/psp/mp3.c b/psp/mp3.c index db3e39d..af50611 100644 --- a/psp/mp3.c +++ b/psp/mp3.c @@ -473,3 +473,17 @@ int mp3_get_offset(void) // 0-1023 } +void mp3_reopen_file(void) +{ + if (mp3_fname == NULL) return; + lprintf("mp3_reopen_file(%s)\n", mp3_fname); + + // try closing, just in case + if (mp3_handle >= 0) sceIoClose(mp3_handle); + + mp3_handle = sceIoOpen(mp3_fname, PSP_O_RDONLY, 0777); + if (mp3_handle >= 0) + sceIoLseek32(mp3_handle, mp3_src_pos, PSP_SEEK_SET); + lprintf("mp3_reopen_file %s\n", mp3_handle >= 0 ? "ok" : "failed"); +} +