#include "gp2x.h"\r
#include "emu.h"\r
#include "menu.h"\r
-#include "mp3.h"\r
+#include "../common/mp3.h"\r
#include "../common/arm_utils.h"\r
#include "../common/menu.h"\r
#include "../common/emu.h"\r
int length_mp3;\r
int cdda_on;\r
\r
- // not data track, CDC is reading, playback was started, track not ended\r
- cdda_on = !(Pico_mcd->s68k_regs[0x36] & 1) && (Pico_mcd->scd.Status_CDC & 1) &&\r
- loaded_mp3 && shared_ctl->mp3_offs < shared_ctl->mp3_len;\r
+ // playback was started, track not ended\r
+ cdda_on = loaded_mp3 && shared_ctl->mp3_offs < shared_ctl->mp3_len;\r
\r
if (!cdda_on) return;\r
\r
\r
int mp3_get_offset(void)\r
{\r
- int offs1024 = 0;\r
+ unsigned int offs1024 = 0;\r
int cdda_on;\r
\r
cdda_on = (PicoMCD & 1) && (PicoOpt&0x800) && !(Pico_mcd->s68k_regs[0x36] & 1) &&\r
\r
if (cdda_on) {\r
offs1024 = shared_ctl->mp3_offs << 7;\r
- offs1024 /= shared_ctl->mp3_len;\r
- offs1024 <<= 3;\r
+ offs1024 /= shared_ctl->mp3_len >> 3;\r
}\r
- printf("offs1024=%i (%i/%i)\n", offs1024, shared_ctl->mp3_offs, shared_ctl->mp3_len);\r
+ printf("offs1024=%u (%i/%i)\n", offs1024, shared_ctl->mp3_offs, shared_ctl->mp3_len);\r
\r
return offs1024;\r
}\r