1 #ifndef _INCLUDE_SYS_CD_H
2 #define _INCLUDE_SYS_CD_H
3 
4 #ifndef LINUX
5 #define CDROM_AUDIO_PLAY 0x11
6 #define CDROM_AUDIO_PAUSED 0x12
7 #endif
8 
9 /*
10  * CD acces section
11  *
12  * No need to implement them if you don't have a CD machine, don't want
13  * or can't add PC Engine CD support
14  */
15 
16   /*
17    * osd_cd_init
18    *
19    * Try to initialize the cd drive
20    * The char* in input is the iso_filename, i.e. the name specified by the
21    * -i command line parameter or "" if not specified (use default for your
22    * system then)
23    * return 0 on success else non zero value on error
24    */
25   int osd_cd_init(char*);
26 
27   /*
28    * osd_cd_close
29    *
30    * Releases the resources allocated by osd_cd_init
31    */
32   void osd_cd_close(void);
33 
34 
35   /*
36    * osd_cd_read
37    *
38    * Read a 2048 cooked sector from the cd
39    * Returns the read data in the UChar* variable
40    * Data are located at sector in the UInt32 variable
41    * return 0 on success else non zero value on error
42    */
43   void osd_cd_read(UChar*, UInt32);
44 
45   /*
46    * osd_cd_stop_audio
47    *
48    * Stops the audio playing from cd is any
49    */
50   void osd_cd_stop_audio(void);
51 
52   /*
53    * osd_cd_track_info
54    *
55    * Return the msf location of the beginning of the given track
56    * plus the control byte of it
57    */
58   void osd_cd_track_info(UChar track,
59                          int* min,
60                          int* sec,
61                          int* fra,
62                          int* control);
63 
64   /*
65    * osd_cd_nb_tracks
66    *
67    * Return the index of the first and last track of the cd
68    */
69   void osd_cd_nb_tracks(int* first,
70                         int* last);
71 
72   /*
73    * osd_cd_length
74    *
75    * Return the total length of the cd
76    */
77   void osd_cd_length(int* min,
78                      int* sec,
79                      int* fra);
80 
81 
82   /*
83    * osd_cd_play_audio_track
84    *
85    * Plays the selected audio track
86    */
87   void osd_cd_play_audio_track(UChar track);
88 
89   /*
90    * osd_cd_play_audio_range
91    *
92    * Plays audio range specified in msf mode
93    */
94   void osd_cd_play_audio_range(UChar min_from,
95                                UChar sec_from,
96                                UChar fra_from,
97                                UChar min_to,
98                                UChar sec_to,
99                                UChar fra_to);
100 	/*
101 	 * osd_cd_pause
102 	 *
103 	 * Pauses the cdda playing
104 	 */
105 	void osd_cd_pause();
106 
107 	/*
108 	 * osd_cd_status
109 	 *
110 	 * Get status about the current cdda playing
111 	 */
112 	void osd_cd_status(int *status);
113 
114 	/*
115 	 * osd_cd_subchannel_info
116 	 *
117 	 * Fills the pce buffer given as param with info about the subchannel
118 	 */
119 	void osd_cd_subchannel_info(UInt16 offset);
120 
121 	/*
122 	 * osd_cd_resume
123 	 *
124 	 * Resumes paused cdda playback
125 	 */
126 	void osd_cd_resume(void);
127 #endif
128