Source

pygame / docs / ref / cdrom.html

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>pygame.cdrom &mdash; Pygame v1.9.2 documentation</title>
    <link rel="stylesheet" href="../_static/pygame.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.9.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="shortcut icon" href="../_static/pygame.ico"/>
    <link rel="top" title="Pygame v1.9.2 documentation" href="../index.html" />
    <link rel="next" title="pygame.Color" href="color.html" />
    <link rel="prev" title="pygame.camera" href="camera.html" /> 
  </head>
  <body>  

    <div class="document">

  <div class="header">
    <table>
      <tr>
	<td class="logo">
	  <a href="http://www.pygame.org/">
	    <img src="../_static/pygame_tiny.png"/>
	  </a>
	  <h5>pygame documentation</h5>
	</td>
	<td class="pagelinks">
	  <p class="top">
	    ||
	    <a href="http://www.pygame.org/">Pygame Home</a> ||
	    <a href="../index.html">Help Contents</a> ||
	    <a href="../genindex.html">Reference Index</a> ||
	  </p>
	  <p class="bottom">
	    <a href="camera.html">camera</a> || 
	    <a href="cdrom.html">cdrom</a> || 
	    <a href="color.html">Color</a> || 
	    <a href="cursors.html">cursors</a> || 
	    <a href="display.html">display</a> || 
	    <a href="draw.html">draw</a> || 
	    <a href="event.html">event</a> || 
	    <a href="examples.html">examples</a> || 
	    <a href="font.html">font</a> || 
	    <a href="freetype.html">freetype</a> || 
	    <a href="gfxdraw.html">gfxdraw</a> || 
	    <a href="image.html">image</a> || 
	    <a href="joystick.html">joystick</a> || 
	    <a href="key.html">key</a> || 
	    <a href="locals.html">locals</a> || 
	    <a href="mask.html">mask</a> || 
	    <a href="math.html">math</a> || 
	    <a href="midi.html">midi</a> || 
	    <a href="mixer.html">mixer</a> || 
	    <a href="mouse.html">mouse</a> || 
	    <a href="movie.html">movie</a> || 
	    <a href="music.html">music</a> || 
	    <a href="overlay.html">Overlay</a> || 
	    <a href="pixelarray.html">PixelArray</a> || 
	    <a href="pixelcopy.html">pixelcopy</a> || 
	    <a href="pygame.html">pygame</a> || 
	    <a href="rect.html">Rect</a> || 
	    <a href="scrap.html">scrap</a> || 
	    <a href="sndarray.html">sndarray</a> || 
	    <a href="sprite.html">sprite</a> || 
	    <a href="surface.html">Surface</a> || 
	    <a href="surfarray.html">surfarray</a> || 
	    <a href="tests.html">tests</a> || 
	    <a href="time.html">time</a> || 
	    <a href="transform.html">transform</a> || 
	    <a href="pygame.html#module-pygame.version">version</a>
	  </p>
	</td>
      </tr>
    </table>
  </div>

      <div class="documentwrapper">
          <div class="body">
            
  <div class="sectionwrapper">
<div class="section" id="module-pygame.cdrom">
<span id="pygame-cdrom"></span><dl class="definition module">
<dt class="title module">
<tt class="docutils literal"><span class="pre">pygame.cdrom</span></tt></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">pygame module for audio cdrom control</span></div>
</div>
<table border="1" class="toc docutils">
<colgroup>
<col width="32%" />
<col width="1%" />
<col width="66%" />
</colgroup>
<tbody valign="top">
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.init">pygame.cdrom.init</a></td>
<td></td>
<td>initialize the cdrom module</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.quit">pygame.cdrom.quit</a></td>
<td></td>
<td>uninitialize the cdrom module</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.get_init">pygame.cdrom.get_init</a></td>
<td></td>
<td>true if the cdrom module is initialized</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.get_count">pygame.cdrom.get_count</a></td>
<td></td>
<td>number of cd drives on the system</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD">pygame.cdrom.CD</a></td>
<td></td>
<td>class to manage a cdrom drive</td>
</tr>
</tbody>
</table>
<p>The cdrom module manages the <tt class="docutils literal"><span class="pre">CD</span></tt> and <tt class="docutils literal"><span class="pre">DVD</span></tt> drives on a computer. It can
also control the playback of audio cd&#8217;s. This module needs to be initialized
before it can do anything. Each <tt class="docutils literal"><span class="pre">CD</span></tt> object you create represents a cdrom
drive and must also be initialized individually before it can do most things.</p>
<dl class="definition function">
<dt class="title" id="pygame.cdrom.init">
<tt class="descclassname">pygame.cdrom.</tt><tt class="descname">init</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.init" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">initialize the cdrom module</span></div>
<div class="line"><span class="signature">init() -&gt; None</span></div>
</div>
<p>Initialize the cdrom module. This will scan the system for all <tt class="docutils literal"><span class="pre">CD</span></tt>
devices. The module must be initialized before any other functions will
work. This automatically happens when you call <tt class="docutils literal"><span class="pre">pygame.init()</span></tt>.</p>
<p>It is safe to call this function more than once.</p>
</dd></dl>

<dl class="definition function">
<dt class="title" id="pygame.cdrom.quit">
<tt class="descclassname">pygame.cdrom.</tt><tt class="descname">quit</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.quit" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">uninitialize the cdrom module</span></div>
<div class="line"><span class="signature">quit() -&gt; None</span></div>
</div>
<p>Uninitialize the cdrom module. After you call this any existing <tt class="docutils literal"><span class="pre">CD</span></tt>
objects will no longer work.</p>
<p>It is safe to call this function more than once.</p>
</dd></dl>

<dl class="definition function">
<dt class="title" id="pygame.cdrom.get_init">
<tt class="descclassname">pygame.cdrom.</tt><tt class="descname">get_init</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.get_init" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">true if the cdrom module is initialized</span></div>
<div class="line"><span class="signature">get_init() -&gt; bool</span></div>
</div>
<p>Test if the cdrom module is initialized or not. This is different than the
<tt class="docutils literal"><span class="pre">CD.init()</span></tt> since each drive must also be initialized individually.</p>
</dd></dl>

<dl class="definition function">
<dt class="title" id="pygame.cdrom.get_count">
<tt class="descclassname">pygame.cdrom.</tt><tt class="descname">get_count</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.get_count" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">number of cd drives on the system</span></div>
<div class="line"><span class="signature">get_count() -&gt; count</span></div>
</div>
<p>Return the number of cd drives on the system. When you create <tt class="docutils literal"><span class="pre">CD</span></tt> objects
you need to pass an integer id that must be lower than this count. The count
will be 0 if there are no drives on the system.</p>
</dd></dl>

<dl class="definition class">
<dt class="title" id="pygame.cdrom.CD">
<em class="property">class </em><tt class="descclassname">pygame.cdrom.</tt><tt class="descname">CD</tt><a class="headerlink" href="#pygame.cdrom.CD" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">class to manage a cdrom drive</span></div>
<div class="line"><span class="signature">CD(id) -&gt; CD</span></div>
</div>
<table border="1" class="toc docutils">
<colgroup>
<col width="41%" />
<col width="1%" />
<col width="58%" />
</colgroup>
<tbody valign="top">
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.init">pygame.cdrom.CD.init</a></td>
<td></td>
<td>initialize a cdrom drive for use</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.quit">pygame.cdrom.CD.quit</a></td>
<td></td>
<td>uninitialize a cdrom drive for use</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.get_init">pygame.cdrom.CD.get_init</a></td>
<td></td>
<td>true if this cd device initialized</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.play">pygame.cdrom.CD.play</a></td>
<td></td>
<td>start playing audio</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.stop">pygame.cdrom.CD.stop</a></td>
<td></td>
<td>stop audio playback</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.pause">pygame.cdrom.CD.pause</a></td>
<td></td>
<td>temporarily stop audio playback</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.resume">pygame.cdrom.CD.resume</a></td>
<td></td>
<td>unpause audio playback</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.eject">pygame.cdrom.CD.eject</a></td>
<td></td>
<td>eject or open the cdrom drive</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.get_id">pygame.cdrom.CD.get_id</a></td>
<td></td>
<td>the index of the cdrom drive</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.get_name">pygame.cdrom.CD.get_name</a></td>
<td></td>
<td>the system name of the cdrom drive</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.get_busy">pygame.cdrom.CD.get_busy</a></td>
<td></td>
<td>true if the drive is playing audio</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.get_paused">pygame.cdrom.CD.get_paused</a></td>
<td></td>
<td>true if the drive is paused</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.get_current">pygame.cdrom.CD.get_current</a></td>
<td></td>
<td>the current audio playback position</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.get_empty">pygame.cdrom.CD.get_empty</a></td>
<td></td>
<td>False if a cdrom is in the drive</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.get_numtracks">pygame.cdrom.CD.get_numtracks</a></td>
<td></td>
<td>the number of tracks on the cdrom</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.get_track_audio">pygame.cdrom.CD.get_track_audio</a></td>
<td></td>
<td>true if the cdrom track has audio data</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.get_all">pygame.cdrom.CD.get_all</a></td>
<td></td>
<td>get all track information</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.get_track_start">pygame.cdrom.CD.get_track_start</a></td>
<td></td>
<td>start time of a cdrom track</td>
</tr>
<tr><td><a class="toc reference external" href="cdrom.html#pygame.cdrom.CD.get_track_length">pygame.cdrom.CD.get_track_length</a></td>
<td></td>
<td>length of a cdrom track</td>
</tr>
</tbody>
</table>
<p>You can create a <tt class="docutils literal"><span class="pre">CD</span></tt> object for each cdrom on the system. Use
<tt class="docutils literal"><span class="pre">pygame.cdrom.get_count()</span></tt> to determine how many drives actually exist.
The id argument is an integer of the drive, starting at zero.</p>
<p>The <tt class="docutils literal"><span class="pre">CD</span></tt> object is not initialized, you can only call <tt class="docutils literal"><span class="pre">CD.get_id()</span></tt> and
<tt class="docutils literal"><span class="pre">CD.get_name()</span></tt> on an uninitialized drive.</p>
<p>It is safe to create multiple <tt class="docutils literal"><span class="pre">CD</span></tt> objects for the same drive, they will
all cooperate normally.</p>
<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.init">
<tt class="descname">init</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.init" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">initialize a cdrom drive for use</span></div>
<div class="line"><span class="signature">init() -&gt; None</span></div>
</div>
<p>Initialize the cdrom drive for use. The drive must be initialized for
most <tt class="docutils literal"><span class="pre">CD</span></tt> methods to work. Even if the rest of pygame has been
initialized.</p>
<p>There may be a brief pause while the drive is initialized. Avoid
<tt class="docutils literal"><span class="pre">CD.init()</span></tt> if the program should not stop for a second or two.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.quit">
<tt class="descname">quit</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.quit" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">uninitialize a cdrom drive for use</span></div>
<div class="line"><span class="signature">quit() -&gt; None</span></div>
</div>
<p>Uninitialize a drive for use. Call this when your program will not be
accessing the drive for awhile.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.get_init">
<tt class="descname">get_init</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.get_init" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">true if this cd device initialized</span></div>
<div class="line"><span class="signature">get_init() -&gt; bool</span></div>
</div>
<p>Test if this <tt class="docutils literal"><span class="pre">CDROM</span></tt> device is initialized. This is different than the
<tt class="docutils literal"><span class="pre">pygame.cdrom.init()</span></tt> since each drive must also be initialized
individually.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.play">
<tt class="descname">play</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.play" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">start playing audio</span></div>
<div class="line"><span class="signature">play(track, start=None, end=None) -&gt; None</span></div>
</div>
<p>Playback audio from an audio cdrom in the drive. Besides the track number
argument, you can also pass a starting and ending time for playback. The
start and end time are in seconds, and can limit the section of an audio
track played.</p>
<p>If you pass a start time but no end, the audio will play to the end of
the track. If you pass a start time and &#8216;None&#8217; for the end time, the
audio will play to the end of the entire disc.</p>
<p>See the <tt class="docutils literal"><span class="pre">CD.get_numtracks()</span></tt> and <tt class="docutils literal"><span class="pre">CD.get_track_audio()</span></tt> to find
tracks to playback.</p>
<p>Note, track 0 is the first track on the <tt class="docutils literal"><span class="pre">CD</span></tt>. Track numbers start at
zero.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.stop">
<tt class="descname">stop</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.stop" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">stop audio playback</span></div>
<div class="line"><span class="signature">stop() -&gt; None</span></div>
</div>
<p>Stops playback of audio from the cdrom. This will also lose the current
playback position. This method does nothing if the drive isn&#8217;t already
playing audio.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.pause">
<tt class="descname">pause</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.pause" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">temporarily stop audio playback</span></div>
<div class="line"><span class="signature">pause() -&gt; None</span></div>
</div>
<p>Temporarily stop audio playback on the <tt class="docutils literal"><span class="pre">CD</span></tt>. The playback can be
resumed at the same point with the <tt class="docutils literal"><span class="pre">CD.resume()</span></tt> method. If the <tt class="docutils literal"><span class="pre">CD</span></tt>
is not playing this method does nothing.</p>
<p>Note, track 0 is the first track on the <tt class="docutils literal"><span class="pre">CD</span></tt>. Track numbers start at
zero.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.resume">
<tt class="descname">resume</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.resume" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">unpause audio playback</span></div>
<div class="line"><span class="signature">resume() -&gt; None</span></div>
</div>
<p>Unpause a paused <tt class="docutils literal"><span class="pre">CD</span></tt>. If the <tt class="docutils literal"><span class="pre">CD</span></tt> is not paused or already playing,
this method does nothing.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.eject">
<tt class="descname">eject</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.eject" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">eject or open the cdrom drive</span></div>
<div class="line"><span class="signature">eject() -&gt; None</span></div>
</div>
<p>This will open the cdrom drive and eject the cdrom. If the drive is
playing or paused it will be stopped.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.get_id">
<tt class="descname">get_id</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.get_id" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">the index of the cdrom drive</span></div>
<div class="line"><span class="signature">get_id() -&gt; id</span></div>
</div>
<p>Returns the integer id that was used to create the <tt class="docutils literal"><span class="pre">CD</span></tt> instance. This
method can work on an uninitialized <tt class="docutils literal"><span class="pre">CD</span></tt>.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.get_name">
<tt class="descname">get_name</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.get_name" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">the system name of the cdrom drive</span></div>
<div class="line"><span class="signature">get_name() -&gt; name</span></div>
</div>
<p>Return the string name of the drive. This is the system name used to
represent the drive. It is often the drive letter or device name. This
method can work on an uninitialized <tt class="docutils literal"><span class="pre">CD</span></tt>.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.get_busy">
<tt class="descname">get_busy</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.get_busy" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">true if the drive is playing audio</span></div>
<div class="line"><span class="signature">get_busy() -&gt; bool</span></div>
</div>
<p>Returns True if the drive busy playing back audio.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.get_paused">
<tt class="descname">get_paused</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.get_paused" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">true if the drive is paused</span></div>
<div class="line"><span class="signature">get_paused() -&gt; bool</span></div>
</div>
<p>Returns True if the drive is currently paused.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.get_current">
<tt class="descname">get_current</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.get_current" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">the current audio playback position</span></div>
<div class="line"><span class="signature">get_current() -&gt; track, seconds</span></div>
</div>
<p>Returns both the current track and time of that track. This method works
when the drive is either playing or paused.</p>
<p>Note, track 0 is the first track on the <tt class="docutils literal"><span class="pre">CD</span></tt>. Track numbers start at
zero.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.get_empty">
<tt class="descname">get_empty</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.get_empty" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">False if a cdrom is in the drive</span></div>
<div class="line"><span class="signature">get_empty() -&gt; bool</span></div>
</div>
<p>Return False if there is a cdrom currently in the drive. If the drive is
empty this will return True.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.get_numtracks">
<tt class="descname">get_numtracks</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.get_numtracks" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">the number of tracks on the cdrom</span></div>
<div class="line"><span class="signature">get_numtracks() -&gt; count</span></div>
</div>
<p>Return the number of tracks on the cdrom in the drive. This will return
zero of the drive is empty or has no tracks.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.get_track_audio">
<tt class="descname">get_track_audio</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.get_track_audio" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">true if the cdrom track has audio data</span></div>
<div class="line"><span class="signature">get_track_audio(track) -&gt; bool</span></div>
</div>
<p>Determine if a track on a cdrom contains audio data. You can also call
<tt class="docutils literal"><span class="pre">CD.num_tracks()</span></tt> and <tt class="docutils literal"><span class="pre">CD.get_all()</span></tt> to determine more information
about the cdrom.</p>
<p>Note, track 0 is the first track on the <tt class="docutils literal"><span class="pre">CD</span></tt>. Track numbers start at
zero.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.get_all">
<tt class="descname">get_all</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.get_all" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">get all track information</span></div>
<div class="line"><span class="signature">get_all() -&gt; [(audio, start, end, lenth), ...]</span></div>
</div>
<p>Return a list with information for every track on the cdrom. The
information consists of a tuple with four values. The audio value is True
if the track contains audio data. The start, end, and length values are
floating point numbers in seconds. Start and end represent absolute times
on the entire disc.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.get_track_start">
<tt class="descname">get_track_start</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.get_track_start" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">start time of a cdrom track</span></div>
<div class="line"><span class="signature">get_track_start(track) -&gt; seconds</span></div>
</div>
<p>Return the absolute time in seconds where at start of the cdrom track.</p>
<p>Note, track 0 is the first track on the <tt class="docutils literal"><span class="pre">CD</span></tt>. Track numbers start at
zero.</p>
</dd></dl>

<dl class="definition method">
<dt class="title" id="pygame.cdrom.CD.get_track_length">
<tt class="descname">get_track_length</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.cdrom.CD.get_track_length" title="Permalink to this definition"></a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">length of a cdrom track</span></div>
<div class="line"><span class="signature">get_track_length(track) -&gt; seconds</span></div>
</div>
<p>Return a floating point value in seconds of the length of the cdrom
track.</p>
<p>Note, track 0 is the first track on the <tt class="docutils literal"><span class="pre">CD</span></tt>. Track numbers start at
zero.</p>
</dd></dl>

</dd></dl>

</dd></dl>

</div>

  </div>
          </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="color.html" title="pygame.Color"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="camera.html" title="pygame.camera"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">Pygame v1.9.2 documentation</a> &raquo;</li>
    <script type="text/javascript" src="jquery.plugin.docscomments.js"></script>

      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2011, Pygame Developers.
    </div>
  </body>
</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.