7 CONTENT=
"Modular DocBook HTML Stylesheet Version 1.76b+
10 TITLE=
"SDL Library Documentation"
11 HREF=
"index.html"><LINK
14 HREF=
"cdrom.html"><LINK
17 HREF=
"sdlcdopen.html"><LINK
20 HREF=
"sdlcdplay.html"></HEAD
31 SUMMARY=
"Header navigation table"
40 >SDL Library Documentation
</TH
83 >SDL_CDStatus
--
Returns the current status of the given drive.
</DIV
85 CLASS=
"REFSYNOPSISDIV"
99 CLASS=
"FUNCSYNOPSISINFO"
100 >#include
"SDL.h"</PRE
109 >(SDL_CD *cdrom);
</CODE
112 CLASS=
"FUNCSYNOPSISINFO"
113 >/* Given a status, returns true if there's a disk in the drive */
114 #define CD_INDRIVE(status) ((int)status
> 0)
</PRE
127 >This function returns the current status of the given drive. Status is described like so:
129 CLASS=
"PROGRAMLISTING"
139 >If the drive has a CD in it, the table of contents of the CD and current
140 play position of the CD will be stored in the SDL_CD structure.
</P
145 > is provided for convenience,
146 and given a status returns true if there's a disk in the drive.
</P
157 > also updates the
<A
163 > structure passed to it.
</P
175 CLASS=
"PROGRAMLISTING"
176 >int playTrack(int track)
180 if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) {
181 /* clamp to the actual number of tracks on the CD */
182 if (track
>= cdrom-
>numtracks) {
183 track = cdrom-
>numtracks-
1;
186 if ( SDL_CDPlayTracks(cdrom, track,
0,
1,
0) ==
0 ) {
214 SUMMARY=
"Footer navigation table"
225 HREF=
"sdlcdopen.html"
243 HREF=
"sdlcdplay.html"