improve cue handling a bit
[picodrive.git] / pico / sound / sound.c
index ede33f1..236a483 100644 (file)
@@ -12,6 +12,7 @@
 #include "sn76496.h"\r
 #include "../pico_int.h"\r
 #include "../cd/pcm.h"\r
+#include "../cd/cue.h"\r
 #include "mix.h"\r
 \r
 #define SIMPLE_WRITE_SOUND 0\r
@@ -260,7 +261,7 @@ PICO_INTERNAL void cdda_start_play(void)
     return;\r
   }\r
 \r
-  if (Pico_mcd->TOC.Tracks[i].ftype == TYPE_MP3)\r
+  if (Pico_mcd->TOC.Tracks[i].ftype == CT_MP3)\r
   {\r
     int pos1024 = 0;\r
 \r
@@ -280,7 +281,7 @@ PICO_INTERNAL void cdda_start_play(void)
   cdda_stream = Pico_mcd->TOC.Tracks[i].F;\r
   PicoCDBufferFlush(); // buffering relies on fp not being touched\r
   pm_seek(cdda_stream, lba_offset * 2352, SEEK_SET);\r
-  if (Pico_mcd->TOC.Tracks[i].ftype == TYPE_WAV)\r
+  if (Pico_mcd->TOC.Tracks[i].ftype == CT_WAV)\r
   {\r
     // skip headers, assume it's 44kHz stereo uncompressed\r
     pm_seek(cdda_stream, 44, SEEK_CUR);\r
@@ -358,7 +359,7 @@ static int PsndRender(int offset, int length)
     // note: only 44, 22 and 11 kHz supported, with forced stereo\r
     int index = Pico_mcd->scd.Cur_Track - 1;\r
 \r
-    if (Pico_mcd->TOC.Tracks[index].ftype == TYPE_MP3)\r
+    if (Pico_mcd->TOC.Tracks[index].ftype == CT_MP3)\r
       mp3_update(buf32, length, stereo);\r
     else\r
       cdda_raw_update(buf32, length);\r