7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
10 TITLE="SDL Library Documentation"
11 HREF="index.html"><LINK
14 HREF="reference.html"><LINK
16 TITLE="SDL_CloseAudio"
17 HREF="sdlcloseaudio.html"><LINK
19 TITLE="SDL_CDNumDrives"
20 HREF="sdlcdnumdrives.html"><META
24 CONTENT="function"></HEAD
35 SUMMARY="Header navigation table"
44 >SDL Library Documentation</TH
52 HREF="sdlcloseaudio.html"
66 HREF="sdlcdnumdrives.html"
81 >Chapter 11. CD-ROM</H1
91 HREF="sdlcdnumdrives.html"
93 > -- Returns the number of CD-ROM drives on the system.</DT
98 > -- Returns a human-readable, system-dependent identifier for the CD-ROM.</DT
101 HREF="sdlcdopen.html"
103 > -- Opens a CD-ROM drive for access.</DT
106 HREF="sdlcdstatus.html"
108 > -- Returns the current status of the given drive.</DT
111 HREF="sdlcdplay.html"
113 > -- Play a CD</DT
116 HREF="sdlcdplaytracks.html"
118 > -- Play the given CD track(s)</DT
121 HREF="sdlcdpause.html"
123 > -- Pauses a CDROM</DT
126 HREF="sdlcdresume.html"
128 > -- Resumes a CDROM</DT
131 HREF="sdlcdstop.html"
133 > -- Stops a CDROM</DT
136 HREF="sdlcdeject.html"
138 > -- Ejects a CDROM</DT
141 HREF="sdlcdclose.html"
143 > -- Closes a SDL_CD handle</DT
148 > -- CDROM Drive Information</DT
151 HREF="sdlcdtrack.html"
153 > -- CD Track Information Structure</DT
157 >SDL supports audio control of up to 32 local CD-ROM drives at once.</P
159 >You use this API to perform all the basic functions of a CD player,
160 including listing the tracks, playing, stopping, and ejecting the CD-ROM.
161 (Currently, multi-changer CD drives are not supported.)</P
163 >Before you call any of the SDL CD-ROM functions, you must first call
166 >SDL_Init(SDL_INIT_CDROM)</TT
167 >", which scans the system for
168 CD-ROM drives, and sets the program up for audio control. Check the
169 return code, which should be <SPAN
173 were any errors in starting up.</P
175 >After you have initialized the library, you can find out how many drives
176 are available using the <TT
178 >SDL_CDNumDrives()</TT
180 The first drive listed is the system default CD-ROM drive. After you have
181 chosen a drive, and have opened it with <TT
185 you can check the status and start playing if there's a CD in the drive.</P
187 >A CD-ROM is organized into one or more tracks, each consisting of a certain
188 number of "frames". Each frame is ~2K in size, and at normal playing speed,
189 a CD plays 75 frames per second. SDL works with the number of frames on a
190 CD, but this can easily be converted to the more familiar minutes/seconds
191 format by using the <TT
201 SUMMARY="Footer navigation table"
212 HREF="sdlcloseaudio.html"
230 HREF="sdlcdnumdrives.html"
246 HREF="reference.html"