move more globals to PicoInterface
[picodrive.git] / platform / gp2x / 940ctl.c
index ff79c88..c270bfe 100644 (file)
@@ -402,9 +402,9 @@ int YM2612UpdateOne_940(int *buffer, int length, int stereo, int is_buf_empty)
        writebuff_ptr = 0;\r
 \r
        /* predict sample counter for next frame */\r
-       if (PsndLen_exc_add) {\r
-               length = PsndLen;\r
-               if (PsndLen_exc_cnt + PsndLen_exc_add >= 0x10000) length++;\r
+       if (Pico.snd.len_e_add) {\r
+               length = Pico.snd.len;\r
+               if (Pico.snd.len_e_cnt + Pico.snd.len_e_add >= 0x10000) length++;\r
        }\r
 \r
        /* give 940 ym job */\r
@@ -424,7 +424,7 @@ int YM2612UpdateOne_940(int *buffer, int length, int stereo, int is_buf_empty)
 \r
 int mp3dec_decode(FILE *f, int *file_pos, int file_len)\r
 {\r
-       if (!(PicoOpt & POPT_EXT_FM)) {\r
+       if (!(PicoIn.opt & POPT_EXT_FM)) {\r
                //mp3_update_local(buffer, length, stereo);\r
                return 0;\r
        }\r
@@ -456,18 +456,18 @@ int mp3dec_decode(FILE *f, int *file_pos, int file_len)
 \r
 int mp3dec_start(FILE *f, int fpos_start)\r
 {\r
-       if (!(PicoOpt & POPT_EXT_FM)) {\r
+       if (!(PicoIn.opt & POPT_EXT_FM)) {\r
                //mp3_start_play_local(f, pos);\r
                return -1;\r
        }\r
 \r
        if (loaded_mp3 != f)\r
        {\r
-               if (PicoMessage != NULL)\r
+               if (PicoIn.osdMessage != NULL)\r
                {\r
                        fseek(f, 0, SEEK_END);\r
                        if (ftell(f) > 2*1024*1024)\r
-                               PicoMessage("Loading MP3...");\r
+                               PicoIn.osdMessage("Loading MP3...");\r
                }\r
                fseek(f, 0, SEEK_SET);\r
                fread(mp3_mem, 1, MP3_SIZE_MAX, f);\r