home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / python / pytexdoc / ext / lib / lib2 / cd / tex
LaTeX Document  |  1996-11-08  |  11.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: LaTeX Document (document/latex).

You can browse this item here: tex

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 42 75 69 6c 74 2d 69 |\section|{Built-i|
|00000010| 6e 20 4d 6f 64 75 6c 65 | 20 5c 73 65 63 74 63 6f |n Module| \sectco|
|00000020| 64 65 7b 63 64 7d 7d 0a | 5c 62 69 6d 6f 64 69 6e |de{cd}}.|\bimodin|
|00000030| 64 65 78 7b 63 64 7d 0a | 0a 54 68 69 73 20 6d 6f |dex{cd}.|.This mo|
|00000040| 64 75 6c 65 20 70 72 6f | 76 69 64 65 73 20 61 6e |dule pro|vides an|
|00000050| 20 69 6e 74 65 72 66 61 | 63 65 20 74 6f 20 74 68 | interfa|ce to th|
|00000060| 65 20 53 69 6c 69 63 6f | 6e 20 47 72 61 70 68 69 |e Silico|n Graphi|
|00000070| 63 73 20 43 44 20 6c 69 | 62 72 61 72 79 2e 0a 49 |cs CD li|brary..I|
|00000080| 74 20 69 73 20 61 76 61 | 69 6c 61 62 6c 65 20 6f |t is ava|ilable o|
|00000090| 6e 6c 79 20 6f 6e 20 53 | 69 6c 69 63 6f 6e 20 47 |nly on S|ilicon G|
|000000a0| 72 61 70 68 69 63 73 20 | 73 79 73 74 65 6d 73 2e |raphics |systems.|
|000000b0| 0a 0a 54 68 65 20 77 61 | 79 20 74 68 65 20 6c 69 |..The wa|y the li|
|000000c0| 62 72 61 72 79 20 77 6f | 72 6b 73 20 69 73 20 61 |brary wo|rks is a|
|000000d0| 73 20 66 6f 6c 6c 6f 77 | 73 2e 20 20 41 20 70 72 |s follow|s. A pr|
|000000e0| 6f 67 72 61 6d 20 6f 70 | 65 6e 73 20 74 68 65 20 |ogram op|ens the |
|000000f0| 43 44 2d 52 4f 4d 0a 64 | 65 76 69 63 65 20 77 69 |CD-ROM.d|evice wi|
|00000100| 74 68 20 5c 63 6f 64 65 | 7b 63 64 2e 6f 70 65 6e |th \code|{cd.open|
|00000110| 28 29 7d 20 61 6e 64 20 | 63 72 65 61 74 65 73 20 |()} and |creates |
|00000120| 61 20 70 61 72 73 65 72 | 20 74 6f 20 70 61 72 73 |a parser| to pars|
|00000130| 65 20 74 68 65 20 64 61 | 74 61 0a 66 72 6f 6d 20 |e the da|ta.from |
|00000140| 74 68 65 20 43 44 20 77 | 69 74 68 20 5c 63 6f 64 |the CD w|ith \cod|
|00000150| 65 7b 63 64 2e 63 72 65 | 61 74 65 70 61 72 73 65 |e{cd.cre|ateparse|
|00000160| 72 28 29 7d 2e 20 20 54 | 68 65 20 6f 62 6a 65 63 |r()}. T|he objec|
|00000170| 74 20 72 65 74 75 72 6e | 65 64 20 62 79 0a 5c 63 |t return|ed by.\c|
|00000180| 6f 64 65 7b 63 64 2e 6f | 70 65 6e 28 29 7d 20 63 |ode{cd.o|pen()} c|
|00000190| 61 6e 20 62 65 20 75 73 | 65 64 20 74 6f 20 72 65 |an be us|ed to re|
|000001a0| 61 64 20 64 61 74 61 20 | 66 72 6f 6d 20 74 68 65 |ad data |from the|
|000001b0| 20 43 44 2c 20 62 75 74 | 20 61 6c 73 6f 20 74 6f | CD, but| also to|
|000001c0| 20 67 65 74 0a 73 74 61 | 74 75 73 20 69 6e 66 6f | get.sta|tus info|
|000001d0| 72 6d 61 74 69 6f 6e 20 | 66 6f 72 20 74 68 65 20 |rmation |for the |
|000001e0| 43 44 2d 52 4f 4d 20 64 | 65 76 69 63 65 2c 20 61 |CD-ROM d|evice, a|
|000001f0| 6e 64 20 74 6f 20 67 65 | 74 20 69 6e 66 6f 72 6d |nd to ge|t inform|
|00000200| 61 74 69 6f 6e 20 61 62 | 6f 75 74 0a 74 68 65 20 |ation ab|out.the |
|00000210| 43 44 2c 20 73 75 63 68 | 20 61 73 20 74 68 65 20 |CD, such| as the |
|00000220| 74 61 62 6c 65 20 6f 66 | 20 63 6f 6e 74 65 6e 74 |table of| content|
|00000230| 73 2e 20 20 44 61 74 61 | 20 66 72 6f 6d 20 74 68 |s. Data| from th|
|00000240| 65 20 43 44 20 69 73 20 | 70 61 73 73 65 64 20 74 |e CD is |passed t|
|00000250| 6f 0a 74 68 65 20 70 61 | 72 73 65 72 2c 20 77 68 |o.the pa|rser, wh|
|00000260| 69 63 68 20 70 61 72 73 | 65 73 20 74 68 65 20 66 |ich pars|es the f|
|00000270| 72 61 6d 65 73 2c 20 61 | 6e 64 20 63 61 6c 6c 73 |rames, a|nd calls|
|00000280| 20 61 6e 79 20 63 61 6c | 6c 62 61 63 6b 0a 66 75 | any cal|lback.fu|
|00000290| 6e 63 74 69 6f 6e 73 20 | 74 68 61 74 20 68 61 76 |nctions |that hav|
|000002a0| 65 20 70 72 65 76 69 6f | 75 73 6c 79 20 62 65 65 |e previo|usly bee|
|000002b0| 6e 20 61 64 64 65 64 2e | 0a 0a 41 6e 20 61 75 64 |n added.|..An aud|
|000002c0| 69 6f 20 43 44 20 69 73 | 20 64 69 76 69 64 65 64 |io CD is| divided|
|000002d0| 20 69 6e 74 6f 20 5c 64 | 66 6e 7b 74 72 61 63 6b | into \d|fn{track|
|000002e0| 73 7d 20 6f 72 20 5c 64 | 66 6e 7b 70 72 6f 67 72 |s} or \d|fn{progr|
|000002f0| 61 6d 73 7d 20 28 74 68 | 65 20 74 65 72 6d 73 0a |ams} (th|e terms.|
|00000300| 61 72 65 20 75 73 65 64 | 20 69 6e 74 65 72 63 68 |are used| interch|
|00000310| 61 6e 67 65 61 62 6c 79 | 29 2e 20 20 54 72 61 63 |angeably|). Trac|
|00000320| 6b 73 20 63 61 6e 20 62 | 65 20 73 75 62 64 69 76 |ks can b|e subdiv|
|00000330| 69 64 65 64 20 69 6e 74 | 6f 0a 5c 64 66 6e 7b 69 |ided int|o.\dfn{i|
|00000340| 6e 64 69 63 65 73 7d 2e | 20 20 41 6e 20 61 75 64 |ndices}.| An aud|
|00000350| 69 6f 20 43 44 20 63 6f | 6e 74 61 69 6e 73 20 61 |io CD co|ntains a|
|00000360| 20 5c 64 66 6e 7b 74 61 | 62 6c 65 20 6f 66 20 63 | \dfn{ta|ble of c|
|00000370| 6f 6e 74 65 6e 74 73 7d | 20 77 68 69 63 68 0a 67 |ontents}| which.g|
|00000380| 69 76 65 73 20 74 68 65 | 20 73 74 61 72 74 73 20 |ives the| starts |
|00000390| 6f 66 20 74 68 65 20 74 | 72 61 63 6b 73 20 6f 6e |of the t|racks on|
|000003a0| 20 74 68 65 20 43 44 2e | 20 20 49 6e 64 65 78 20 | the CD.| Index |
|000003b0| 30 20 69 73 20 75 73 75 | 61 6c 6c 79 20 74 68 65 |0 is usu|ally the|
|000003c0| 0a 70 61 75 73 65 20 62 | 65 66 6f 72 65 20 74 68 |.pause b|efore th|
|000003d0| 65 20 73 74 61 72 74 20 | 6f 66 20 61 20 74 72 61 |e start |of a tra|
|000003e0| 63 6b 2e 20 20 54 68 65 | 20 73 74 61 72 74 20 6f |ck. The| start o|
|000003f0| 66 20 74 68 65 20 74 72 | 61 63 6b 20 61 73 20 67 |f the tr|ack as g|
|00000400| 69 76 65 6e 20 62 79 0a | 74 68 65 20 74 61 62 6c |iven by.|the tabl|
|00000410| 65 20 6f 66 20 63 6f 6e | 74 65 6e 74 73 20 69 73 |e of con|tents is|
|00000420| 20 6e 6f 72 6d 61 6c 6c | 79 20 74 68 65 20 73 74 | normall|y the st|
|00000430| 61 72 74 20 6f 66 20 69 | 6e 64 65 78 20 31 2e 0a |art of i|ndex 1..|
|00000440| 0a 50 6f 73 69 74 69 6f | 6e 73 20 6f 6e 20 61 20 |.Positio|ns on a |
|00000450| 43 44 20 63 61 6e 20 62 | 65 20 72 65 70 72 65 73 |CD can b|e repres|
|00000460| 65 6e 74 65 64 20 69 6e | 20 74 77 6f 20 77 61 79 |ented in| two way|
|00000470| 73 2e 20 20 45 69 74 68 | 65 72 20 61 20 66 72 61 |s. Eith|er a fra|
|00000480| 6d 65 0a 6e 75 6d 62 65 | 72 20 6f 72 20 61 20 74 |me.numbe|r or a t|
|00000490| 75 70 6c 65 20 6f 66 20 | 74 68 72 65 65 20 76 61 |uple of |three va|
|000004a0| 6c 75 65 73 2c 20 6d 69 | 6e 75 74 65 73 2c 20 73 |lues, mi|nutes, s|
|000004b0| 65 63 6f 6e 64 73 20 61 | 6e 64 20 66 72 61 6d 65 |econds a|nd frame|
|000004c0| 73 2e 20 20 4d 6f 73 74 | 0a 66 75 6e 63 74 69 6f |s. Most|.functio|
|000004d0| 6e 73 20 75 73 65 20 74 | 68 65 20 6c 61 74 74 65 |ns use t|he latte|
|000004e0| 72 20 72 65 70 72 65 73 | 65 6e 74 61 74 69 6f 6e |r repres|entation|
|000004f0| 2e 20 20 50 6f 73 69 74 | 69 6f 6e 73 20 63 61 6e |. Posit|ions can|
|00000500| 20 62 65 20 62 6f 74 68 | 0a 72 65 6c 61 74 69 76 | be both|.relativ|
|00000510| 65 20 74 6f 20 74 68 65 | 20 62 65 67 69 6e 6e 69 |e to the| beginni|
|00000520| 6e 67 20 6f 66 20 74 68 | 65 20 43 44 2c 20 61 6e |ng of th|e CD, an|
|00000530| 64 20 74 6f 20 74 68 65 | 20 62 65 67 69 6e 6e 69 |d to the| beginni|
|00000540| 6e 67 20 6f 66 20 74 68 | 65 0a 74 72 61 63 6b 2e |ng of th|e.track.|
|00000550| 0a 0a 4d 6f 64 75 6c 65 | 20 5c 63 6f 64 65 7b 63 |..Module| \code{c|
|00000560| 64 7d 20 64 65 66 69 6e | 65 73 20 74 68 65 20 66 |d} defin|es the f|
|00000570| 6f 6c 6c 6f 77 69 6e 67 | 20 66 75 6e 63 74 69 6f |ollowing| functio|
|00000580| 6e 73 20 61 6e 64 20 63 | 6f 6e 73 74 61 6e 74 73 |ns and c|onstants|
|00000590| 3a 0a 0a 5c 72 65 6e 65 | 77 63 6f 6d 6d 61 6e 64 |:..\rene|wcommand|
|000005a0| 7b 5c 69 6e 64 65 78 73 | 75 62 69 74 65 6d 7d 7b |{\indexs|ubitem}{|
|000005b0| 28 69 6e 20 6d 6f 64 75 | 6c 65 20 63 64 29 7d 0a |(in modu|le cd)}.|
|000005c0| 0a 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|000005d0| 7d 7b 63 72 65 61 74 65 | 70 61 72 73 65 72 7d 7b |}{create|parser}{|
|000005e0| 7d 0a 43 72 65 61 74 65 | 20 61 6e 64 20 72 65 74 |}.Create| and ret|
|000005f0| 75 72 6e 20 61 6e 20 6f | 70 61 71 75 65 20 70 61 |urn an o|paque pa|
|00000600| 72 73 65 72 20 6f 62 6a | 65 63 74 2e 20 20 54 68 |rser obj|ect. Th|
|00000610| 65 20 6d 65 74 68 6f 64 | 73 20 6f 66 20 74 68 65 |e method|s of the|
|00000620| 20 70 61 72 73 65 72 0a | 6f 62 6a 65 63 74 20 61 | parser.|object a|
|00000630| 72 65 20 64 65 73 63 72 | 69 62 65 64 20 62 65 6c |re descr|ibed bel|
|00000640| 6f 77 2e 0a 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |ow..\end|{funcdes|
|00000650| 63 7d 0a 0a 5c 62 65 67 | 69 6e 7b 66 75 6e 63 64 |c}..\beg|in{funcd|
|00000660| 65 73 63 7d 7b 6d 73 66 | 74 6f 66 72 61 6d 65 7d |esc}{msf|toframe}|
|00000670| 7b 6d 69 6e 5c 2c 20 73 | 65 63 5c 2c 20 66 72 61 |{min\, s|ec\, fra|
|00000680| 6d 65 7d 0a 43 6f 6e 76 | 65 72 74 73 20 61 20 5c |me}.Conv|erts a \|
|00000690| 63 6f 64 65 7b 28 6d 69 | 6e 75 74 65 73 2c 20 73 |code{(mi|nutes, s|
|000006a0| 65 63 6f 6e 64 73 2c 20 | 66 72 61 6d 65 73 29 7d |econds, |frames)}|
|000006b0| 20 74 72 69 70 6c 65 20 | 72 65 70 72 65 73 65 6e | triple |represen|
|000006c0| 74 69 6e 67 20 74 69 6d | 65 0a 69 6e 20 61 62 73 |ting tim|e.in abs|
|000006d0| 6f 6c 75 74 65 20 74 69 | 6d 65 20 63 6f 64 65 20 |olute ti|me code |
|000006e0| 69 6e 74 6f 20 74 68 65 | 20 63 6f 72 72 65 73 70 |into the| corresp|
|000006f0| 6f 6e 64 69 6e 67 20 43 | 44 20 66 72 61 6d 65 20 |onding C|D frame |
|00000700| 6e 75 6d 62 65 72 2e 0a | 5c 65 6e 64 7b 66 75 6e |number..|\end{fun|
|00000710| 63 64 65 73 63 7d 0a 0a | 5c 62 65 67 69 6e 7b 66 |cdesc}..|\begin{f|
|00000720| 75 6e 63 64 65 73 63 7d | 7b 6f 70 65 6e 7d 7b 5c |uncdesc}|{open}{\|
|00000730| 6f 70 74 69 6f 6e 61 6c | 7b 64 65 76 69 63 65 5c |optional|{device\|
|00000740| 6f 70 74 69 6f 6e 61 6c | 7b 5c 2c 20 6d 6f 64 65 |optional|{\, mode|
|00000750| 7d 7d 7d 0a 4f 70 65 6e | 20 74 68 65 20 43 44 2d |}}}.Open| the CD-|
|00000760| 52 4f 4d 20 64 65 76 69 | 63 65 2e 20 20 54 68 65 |ROM devi|ce. The|
|00000770| 20 72 65 74 75 72 6e 20 | 76 61 6c 75 65 20 69 73 | return |value is|
|00000780| 20 61 6e 20 6f 70 61 71 | 75 65 20 70 6c 61 79 65 | an opaq|ue playe|
|00000790| 72 20 6f 62 6a 65 63 74 | 3b 0a 6d 65 74 68 6f 64 |r object|;.method|
|000007a0| 73 20 6f 66 20 74 68 65 | 20 70 6c 61 79 65 72 20 |s of the| player |
|000007b0| 6f 62 6a 65 63 74 20 61 | 72 65 20 64 65 73 63 72 |object a|re descr|
|000007c0| 69 62 65 64 20 62 65 6c | 6f 77 2e 20 20 54 68 65 |ibed bel|ow. The|
|000007d0| 20 64 65 76 69 63 65 20 | 69 73 20 74 68 65 0a 6e | device |is the.n|
|000007e0| 61 6d 65 20 6f 66 20 74 | 68 65 20 53 43 53 49 20 |ame of t|he SCSI |
|000007f0| 64 65 76 69 63 65 20 66 | 69 6c 65 2c 20 65 2e 67 |device f|ile, e.g|
|00000800| 2e 20 2f 64 65 76 2f 73 | 63 73 69 2f 73 63 30 64 |. /dev/s|csi/sc0d|
|00000810| 34 6c 30 2c 20 6f 72 20 | 5c 63 6f 64 65 7b 4e 6f |4l0, or |\code{No|
|00000820| 6e 65 7d 2e 0a 49 66 20 | 6f 6d 69 74 65 64 20 6f |ne}..If |omited o|
|00000830| 72 20 5c 63 6f 64 65 7b | 4e 6f 6e 65 7d 2c 20 74 |r \code{|None}, t|
|00000840| 68 65 20 68 61 72 64 77 | 61 72 65 20 69 6e 76 65 |he hardw|are inve|
|00000850| 6e 74 6f 72 79 20 69 73 | 20 63 6f 6e 73 75 6c 74 |ntory is| consult|
|00000860| 65 64 20 74 6f 0a 6c 6f | 63 61 74 65 20 61 20 43 |ed to.lo|cate a C|
|00000870| 44 2d 52 4f 4d 20 64 72 | 69 76 65 2e 20 20 54 68 |D-ROM dr|ive. Th|
|00000880| 65 20 5c 63 6f 64 65 7b | 6d 6f 64 65 7d 2c 20 69 |e \code{|mode}, i|
|00000890| 66 20 6e 6f 74 20 6f 6d | 69 74 65 64 2c 20 73 68 |f not om|ited, sh|
|000008a0| 6f 75 6c 64 20 62 65 20 | 74 68 65 0a 73 74 72 69 |ould be |the.stri|
|000008b0| 6e 67 20 27 72 27 2e 0a | 5c 65 6e 64 7b 66 75 6e |ng 'r'..|\end{fun|
|000008c0| 63 64 65 73 63 7d 0a 0a | 54 68 65 20 6d 6f 64 75 |cdesc}..|The modu|
|000008d0| 6c 65 20 64 65 66 69 6e | 65 73 20 74 68 65 20 66 |le defin|es the f|
|000008e0| 6f 6c 6c 6f 77 69 6e 67 | 20 76 61 72 69 61 62 6c |ollowing| variabl|
|000008f0| 65 73 3a 0a 0a 5c 62 65 | 67 69 6e 7b 64 61 74 61 |es:..\be|gin{data|
|00000900| 64 65 73 63 7d 7b 65 72 | 72 6f 72 7d 0a 45 78 63 |desc}{er|ror}.Exc|
|00000910| 65 70 74 69 6f 6e 20 72 | 61 69 73 65 64 20 6f 6e |eption r|aised on|
|00000920| 20 76 61 72 69 6f 75 73 | 20 65 72 72 6f 72 73 2e | various| errors.|
|00000930| 0a 5c 65 6e 64 7b 64 61 | 74 61 64 65 73 63 7d 0a |.\end{da|tadesc}.|
|00000940| 0a 5c 62 65 67 69 6e 7b | 64 61 74 61 64 65 73 63 |.\begin{|datadesc|
|00000950| 7d 7b 44 41 54 41 53 49 | 5a 45 7d 0a 54 68 65 20 |}{DATASI|ZE}.The |
|00000960| 73 69 7a 65 20 6f 66 20 | 6f 6e 65 20 66 72 61 6d |size of |one fram|
|00000970| 65 27 73 20 77 6f 72 74 | 68 20 6f 66 20 61 75 64 |e's wort|h of aud|
|00000980| 69 6f 20 64 61 74 61 2e | 20 20 54 68 69 73 20 69 |io data.| This i|
|00000990| 73 20 74 68 65 20 73 69 | 7a 65 20 6f 66 20 74 68 |s the si|ze of th|
|000009a0| 65 0a 61 75 64 69 6f 20 | 64 61 74 61 20 61 73 20 |e.audio |data as |
|000009b0| 70 61 73 73 65 64 20 74 | 6f 20 74 68 65 20 63 61 |passed t|o the ca|
|000009c0| 6c 6c 62 61 63 6b 20 6f | 66 20 74 79 70 65 20 5c |llback o|f type \|
|000009d0| 63 6f 64 65 7b 61 75 64 | 69 6f 7d 2e 0a 5c 65 6e |code{aud|io}..\en|
|000009e0| 64 7b 64 61 74 61 64 65 | 73 63 7d 0a 0a 5c 62 65 |d{datade|sc}..\be|
|000009f0| 67 69 6e 7b 64 61 74 61 | 64 65 73 63 7d 7b 42 4c |gin{data|desc}{BL|
|00000a00| 4f 43 4b 53 49 5a 45 7d | 0a 54 68 65 20 73 69 7a |OCKSIZE}|.The siz|
|00000a10| 65 20 6f 66 20 6f 6e 65 | 20 75 6e 69 6e 74 65 72 |e of one| uninter|
|00000a20| 70 72 65 74 65 64 20 66 | 72 61 6d 65 20 6f 66 20 |preted f|rame of |
|00000a30| 61 75 64 69 6f 20 64 61 | 74 61 2e 0a 5c 65 6e 64 |audio da|ta..\end|
|00000a40| 7b 64 61 74 61 64 65 73 | 63 7d 0a 0a 54 68 65 20 |{datades|c}..The |
|00000a50| 66 6f 6c 6c 6f 77 69 6e | 67 20 76 61 72 69 61 62 |followin|g variab|
|00000a60| 6c 65 73 20 61 72 65 20 | 73 74 61 74 65 73 20 61 |les are |states a|
|00000a70| 73 20 72 65 74 75 72 6e | 65 64 20 62 79 20 5c 63 |s return|ed by \c|
|00000a80| 6f 64 65 7b 67 65 74 73 | 74 61 74 75 73 7d 3a 0a |ode{gets|tatus}:.|
|00000a90| 0a 5c 62 65 67 69 6e 7b | 64 61 74 61 64 65 73 63 |.\begin{|datadesc|
|00000aa0| 7d 7b 52 45 41 44 59 7d | 0a 54 68 65 20 64 72 69 |}{READY}|.The dri|
|00000ab0| 76 65 20 69 73 20 72 65 | 61 64 79 20 66 6f 72 20 |ve is re|ady for |
|00000ac0| 6f 70 65 72 61 74 69 6f | 6e 20 6c 6f 61 64 65 64 |operatio|n loaded|
|00000ad0| 20 77 69 74 68 20 61 6e | 20 61 75 64 69 6f 20 43 | with an| audio C|
|00000ae0| 44 2e 0a 5c 65 6e 64 7b | 64 61 74 61 64 65 73 63 |D..\end{|datadesc|
|00000af0| 7d 0a 0a 5c 62 65 67 69 | 6e 7b 64 61 74 61 64 65 |}..\begi|n{datade|
|00000b00| 73 63 7d 7b 4e 4f 44 49 | 53 43 7d 0a 54 68 65 20 |sc}{NODI|SC}.The |
|00000b10| 64 72 69 76 65 20 64 6f | 65 73 20 6e 6f 74 20 68 |drive do|es not h|
|00000b20| 61 76 65 20 61 20 43 44 | 20 6c 6f 61 64 65 64 2e |ave a CD| loaded.|
|00000b30| 0a 5c 65 6e 64 7b 64 61 | 74 61 64 65 73 63 7d 0a |.\end{da|tadesc}.|
|00000b40| 0a 5c 62 65 67 69 6e 7b | 64 61 74 61 64 65 73 63 |.\begin{|datadesc|
|00000b50| 7d 7b 43 44 52 4f 4d 7d | 0a 54 68 65 20 64 72 69 |}{CDROM}|.The dri|
|00000b60| 76 65 20 69 73 20 6c 6f | 61 64 65 64 20 77 69 74 |ve is lo|aded wit|
|00000b70| 68 20 61 20 43 44 2d 52 | 4f 4d 2e 20 20 53 75 62 |h a CD-R|OM. Sub|
|00000b80| 73 65 71 75 65 6e 74 20 | 70 6c 61 79 20 6f 72 20 |sequent |play or |
|00000b90| 72 65 61 64 20 6f 70 65 | 72 61 74 69 6f 6e 73 0a |read ope|rations.|
|00000ba0| 77 69 6c 6c 20 72 65 74 | 75 72 6e 20 49 2f 4f 20 |will ret|urn I/O |
|00000bb0| 65 72 72 6f 72 73 2e 0a | 5c 65 6e 64 7b 64 61 74 |errors..|\end{dat|
|00000bc0| 61 64 65 73 63 7d 0a 0a | 5c 62 65 67 69 6e 7b 64 |adesc}..|\begin{d|
|00000bd0| 61 74 61 64 65 73 63 7d | 7b 45 52 52 4f 52 7d 0a |atadesc}|{ERROR}.|
|00000be0| 41 6e 20 65 72 72 6f 72 | 20 61 6f 6f 63 75 72 72 |An error| aoocurr|
|00000bf0| 65 64 20 77 68 69 6c 65 | 20 74 72 79 69 6e 67 20 |ed while| trying |
|00000c00| 74 6f 20 72 65 61 64 20 | 74 68 65 20 64 69 73 63 |to read |the disc|
|00000c10| 20 6f 72 20 69 74 73 20 | 74 61 62 6c 65 20 6f 66 | or its |table of|
|00000c20| 0a 63 6f 6e 74 65 6e 74 | 73 2e 0a 5c 65 6e 64 7b |.content|s..\end{|
|00000c30| 64 61 74 61 64 65 73 63 | 7d 0a 0a 5c 62 65 67 69 |datadesc|}..\begi|
|00000c40| 6e 7b 64 61 74 61 64 65 | 73 63 7d 7b 50 4c 41 59 |n{datade|sc}{PLAY|
|00000c50| 49 4e 47 7d 0a 54 68 65 | 20 64 72 69 76 65 20 69 |ING}.The| drive i|
|00000c60| 73 20 69 6e 20 43 44 20 | 70 6c 61 79 65 72 20 6d |s in CD |player m|
|00000c70| 6f 64 65 20 70 6c 61 79 | 69 6e 67 20 61 6e 20 61 |ode play|ing an a|
|00000c80| 75 64 69 6f 20 43 44 20 | 74 68 72 6f 75 67 68 20 |udio CD |through |
|00000c90| 69 74 73 20 61 75 64 69 | 6f 0a 6a 61 63 6b 73 2e |its audi|o.jacks.|
|00000ca0| 0a 5c 65 6e 64 7b 64 61 | 74 61 64 65 73 63 7d 0a |.\end{da|tadesc}.|
|00000cb0| 0a 5c 62 65 67 69 6e 7b | 64 61 74 61 64 65 73 63 |.\begin{|datadesc|
|00000cc0| 7d 7b 50 41 55 53 45 44 | 7d 0a 54 68 65 20 64 72 |}{PAUSED|}.The dr|
|00000cd0| 69 76 65 20 69 73 20 69 | 6e 20 43 44 20 6c 61 79 |ive is i|n CD lay|
|00000ce0| 65 72 20 6d 6f 64 65 20 | 77 69 74 68 20 70 6c 61 |er mode |with pla|
|00000cf0| 79 20 70 61 75 73 65 64 | 2e 0a 5c 65 6e 64 7b 64 |y paused|..\end{d|
|00000d00| 61 74 61 64 65 73 63 7d | 0a 0a 5c 62 65 67 69 6e |atadesc}|..\begin|
|00000d10| 7b 64 61 74 61 64 65 73 | 63 7d 7b 53 54 49 4c 4c |{datades|c}{STILL|
|00000d20| 7d 0a 54 68 65 20 65 71 | 75 69 76 61 6c 65 6e 74 |}.The eq|uivalent|
|00000d30| 20 6f 66 20 5c 63 6f 64 | 65 7b 50 41 55 53 45 44 | of \cod|e{PAUSED|
|00000d40| 7d 20 6f 6e 20 6f 6c 64 | 65 72 20 28 6e 6f 6e 20 |} on old|er (non |
|00000d50| 33 33 30 31 29 20 6d 6f | 64 65 6c 20 54 6f 73 68 |3301) mo|del Tosh|
|00000d60| 69 62 61 0a 43 44 2d 52 | 4f 4d 20 64 72 69 76 65 |iba.CD-R|OM drive|
|00000d70| 73 2e 20 20 53 75 63 68 | 20 64 72 69 76 65 73 20 |s. Such| drives |
|00000d80| 68 61 76 65 20 6e 65 76 | 65 72 20 62 65 65 6e 20 |have nev|er been |
|00000d90| 73 68 69 70 70 65 64 20 | 62 79 20 53 47 49 2e 0a |shipped |by SGI..|
|00000da0| 5c 65 6e 64 7b 64 61 74 | 61 64 65 73 63 7d 0a 0a |\end{dat|adesc}..|
|00000db0| 5c 62 65 67 69 6e 7b 64 | 61 74 61 64 65 73 63 7d |\begin{d|atadesc}|
|00000dc0| 7b 61 75 64 69 6f 7d 0a | 5c 64 61 74 61 6c 69 6e |{audio}.|\datalin|
|00000dd0| 65 7b 70 6e 75 6d 7d 0a | 5c 64 61 74 61 6c 69 6e |e{pnum}.|\datalin|
|00000de0| 65 7b 69 6e 64 65 78 7d | 0a 5c 64 61 74 61 6c 69 |e{index}|.\datali|
|00000df0| 6e 65 7b 70 74 69 6d 65 | 7d 0a 5c 64 61 74 61 6c |ne{ptime|}.\datal|
|00000e00| 69 6e 65 7b 61 74 69 6d | 65 7d 0a 5c 64 61 74 61 |ine{atim|e}.\data|
|00000e10| 6c 69 6e 65 7b 63 61 74 | 61 6c 6f 67 7d 0a 5c 64 |line{cat|alog}.\d|
|00000e20| 61 74 61 6c 69 6e 65 7b | 69 64 65 6e 74 7d 0a 5c |ataline{|ident}.\|
|00000e30| 64 61 74 61 6c 69 6e 65 | 7b 63 6f 6e 74 72 6f 6c |dataline|{control|
|00000e40| 7d 0a 49 6e 74 65 67 65 | 72 20 63 6f 6e 73 74 61 |}.Intege|r consta|
|00000e50| 6e 74 73 20 64 65 73 63 | 72 69 62 69 6e 67 20 74 |nts desc|ribing t|
|00000e60| 68 65 20 76 61 72 69 6f | 75 73 20 74 79 70 65 73 |he vario|us types|
|00000e70| 20 6f 66 20 70 61 72 73 | 65 72 20 63 61 6c 6c 62 | of pars|er callb|
|00000e80| 61 63 6b 73 0a 74 68 61 | 74 20 63 61 6e 20 62 65 |acks.tha|t can be|
|00000e90| 20 73 65 74 20 62 79 20 | 74 68 65 20 5c 63 6f 64 | set by |the \cod|
|00000ea0| 65 7b 61 64 64 63 61 6c | 6c 62 61 63 6b 28 29 7d |e{addcal|lback()}|
|00000eb0| 20 6d 65 74 68 6f 64 20 | 6f 66 20 43 44 20 70 61 | method |of CD pa|
|00000ec0| 72 73 65 72 0a 6f 62 6a | 65 63 74 73 20 28 73 65 |rser.obj|ects (se|
|00000ed0| 65 20 62 65 6c 6f 77 29 | 2e 0a 5c 65 6e 64 7b 64 |e below)|..\end{d|
|00000ee0| 61 74 61 64 65 73 63 7d | 0a 0a 50 6c 61 79 65 72 |atadesc}|..Player|
|00000ef0| 20 6f 62 6a 65 63 74 73 | 20 28 72 65 74 75 72 6e | objects| (return|
|00000f00| 65 64 20 62 79 20 5c 63 | 6f 64 65 7b 63 64 2e 6f |ed by \c|ode{cd.o|
|00000f10| 70 65 6e 28 29 7d 29 20 | 68 61 76 65 20 74 68 65 |pen()}) |have the|
|00000f20| 20 66 6f 6c 6c 6f 77 69 | 6e 67 0a 6d 65 74 68 6f | followi|ng.metho|
|00000f30| 64 73 3a 0a 0a 5c 72 65 | 6e 65 77 63 6f 6d 6d 61 |ds:..\re|newcomma|
|00000f40| 6e 64 7b 5c 69 6e 64 65 | 78 73 75 62 69 74 65 6d |nd{\inde|xsubitem|
|00000f50| 7d 7b 28 43 44 20 70 6c | 61 79 65 72 20 6f 62 6a |}{(CD pl|ayer obj|
|00000f60| 65 63 74 20 6d 65 74 68 | 6f 64 29 7d 0a 0a 5c 62 |ect meth|od)}..\b|
|00000f70| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 61 |egin{fun|cdesc}{a|
|00000f80| 6c 6c 6f 77 72 65 6d 6f | 76 61 6c 7d 7b 7d 0a 55 |llowremo|val}{}.U|
|00000f90| 6e 6c 6f 63 6b 73 20 74 | 68 65 20 65 6a 65 63 74 |nlocks t|he eject|
|00000fa0| 20 62 75 74 74 6f 6e 20 | 6f 6e 20 74 68 65 20 43 | button |on the C|
|00000fb0| 44 2d 52 4f 4d 20 64 72 | 69 76 65 20 70 65 72 6d |D-ROM dr|ive perm|
|00000fc0| 69 74 74 69 6e 67 20 74 | 68 65 20 75 73 65 72 20 |itting t|he user |
|00000fd0| 74 6f 0a 65 6a 65 63 74 | 20 74 68 65 20 63 61 64 |to.eject| the cad|
|00000fe0| 64 79 20 69 66 20 64 65 | 73 69 72 65 64 2e 0a 5c |dy if de|sired..\|
|00000ff0| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 0a 0a 5c |end{func|desc}..\|
|00001000| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|00001010| 62 65 73 74 72 65 61 64 | 73 69 7a 65 7d 7b 7d 0a |bestread|size}{}.|
|00001020| 52 65 74 75 72 6e 73 20 | 74 68 65 20 62 65 73 74 |Returns |the best|
|00001030| 20 76 61 6c 75 65 20 74 | 6f 20 75 73 65 20 66 6f | value t|o use fo|
|00001040| 72 20 74 68 65 20 5c 63 | 6f 64 65 7b 6e 75 6d 5f |r the \c|ode{num_|
|00001050| 66 72 61 6d 65 73 7d 20 | 70 61 72 61 6d 65 74 65 |frames} |paramete|
|00001060| 72 20 6f 66 0a 74 68 65 | 20 5c 63 6f 64 65 7b 72 |r of.the| \code{r|
|00001070| 65 61 64 64 61 7d 20 6d | 65 74 68 6f 64 2e 20 20 |eadda} m|ethod. |
|00001080| 42 65 73 74 20 69 73 20 | 64 65 66 69 6e 65 64 20 |Best is |defined |
|00001090| 61 73 20 74 68 65 20 76 | 61 6c 75 65 20 74 68 61 |as the v|alue tha|
|000010a0| 74 20 70 65 72 6d 69 74 | 73 20 61 0a 63 6f 6e 74 |t permit|s a.cont|
|000010b0| 69 6e 75 6f 75 73 20 66 | 6c 6f 77 20 6f 66 20 64 |inuous f|low of d|
|000010c0| 61 74 61 20 66 72 6f 6d | 20 74 68 65 20 43 44 2d |ata from| the CD-|
|000010d0| 52 4f 4d 20 64 72 69 76 | 65 2e 0a 5c 65 6e 64 7b |ROM driv|e..\end{|
|000010e0| 66 75 6e 63 64 65 73 63 | 7d 0a 0a 5c 62 65 67 69 |funcdesc|}..\begi|
|000010f0| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 63 6c 6f 73 |n{funcde|sc}{clos|
|00001100| 65 7d 7b 7d 0a 46 72 65 | 65 73 20 74 68 65 20 72 |e}{}.Fre|es the r|
|00001110| 65 73 6f 75 72 63 65 73 | 20 61 73 73 6f 63 69 61 |esources| associa|
|00001120| 74 65 64 20 77 69 74 68 | 20 74 68 65 20 70 6c 61 |ted with| the pla|
|00001130| 79 65 72 20 6f 62 6a 65 | 63 74 2e 20 20 41 66 74 |yer obje|ct. Aft|
|00001140| 65 72 20 63 61 6c 6c 69 | 6e 67 0a 5c 63 6f 64 65 |er calli|ng.\code|
|00001150| 7b 63 6c 6f 73 65 7d 2c | 20 74 68 65 20 6d 65 74 |{close},| the met|
|00001160| 68 6f 64 73 20 6f 66 20 | 74 68 65 20 6f 62 6a 65 |hods of |the obje|
|00001170| 63 74 20 73 68 6f 75 6c | 64 20 6e 6f 20 6c 6f 6e |ct shoul|d no lon|
|00001180| 67 65 72 20 62 65 20 75 | 73 65 64 2e 0a 5c 65 6e |ger be u|sed..\en|
|00001190| 64 7b 66 75 6e 63 64 65 | 73 63 7d 0a 0a 5c 62 65 |d{funcde|sc}..\be|
|000011a0| 67 69 6e 7b 66 75 6e 63 | 64 65 73 63 7d 7b 65 6a |gin{func|desc}{ej|
|000011b0| 65 63 74 7d 7b 7d 0a 45 | 6a 65 63 74 73 20 74 68 |ect}{}.E|jects th|
|000011c0| 65 20 63 61 64 64 79 20 | 66 72 6f 6d 20 74 68 65 |e caddy |from the|
|000011d0| 20 43 44 2d 52 4f 4d 20 | 64 72 69 76 65 2e 0a 5c | CD-ROM |drive..\|
|000011e0| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 0a 0a 5c |end{func|desc}..\|
|000011f0| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|00001200| 67 65 74 73 74 61 74 75 | 73 7d 7b 7d 0a 52 65 74 |getstatu|s}{}.Ret|
|00001210| 75 72 6e 73 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |urns inf|ormation|
|00001220| 20 70 65 72 74 61 69 6e | 69 6e 67 20 74 6f 20 74 | pertain|ing to t|
|00001230| 68 65 20 63 75 72 72 65 | 6e 74 20 73 74 61 74 65 |he curre|nt state|
|00001240| 20 6f 66 20 74 68 65 20 | 43 44 2d 52 4f 4d 0a 64 | of the |CD-ROM.d|
|00001250| 72 69 76 65 2e 20 20 54 | 68 65 20 72 65 74 75 72 |rive. T|he retur|
|00001260| 6e 65 64 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |ned info|rmation |
|00001270| 69 73 20 61 20 74 75 70 | 6c 65 20 77 69 74 68 20 |is a tup|le with |
|00001280| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 76 61 |the foll|owing va|
|00001290| 6c 75 65 73 3a 0a 5c 63 | 6f 64 65 7b 73 74 61 74 |lues:.\c|ode{stat|
|000012a0| 65 7d 2c 20 5c 63 6f 64 | 65 7b 74 72 61 63 6b 7d |e}, \cod|e{track}|
|000012b0| 2c 20 5c 63 6f 64 65 7b | 72 74 69 6d 65 7d 2c 20 |, \code{|rtime}, |
|000012c0| 5c 63 6f 64 65 7b 61 74 | 69 6d 65 7d 2c 20 5c 63 |\code{at|ime}, \c|
|000012d0| 6f 64 65 7b 74 74 69 6d | 65 7d 2c 0a 5c 63 6f 64 |ode{ttim|e},.\cod|
|000012e0| 65 7b 66 69 72 73 74 7d | 2c 20 5c 63 6f 64 65 7b |e{first}|, \code{|
|000012f0| 6c 61 73 74 7d 2c 20 5c | 63 6f 64 65 7b 73 63 73 |last}, \|code{scs|
|00001300| 69 5f 61 75 64 69 6f 7d | 2c 20 5c 63 6f 64 65 7b |i_audio}|, \code{|
|00001310| 63 75 72 5f 62 6c 6f 63 | 6b 7d 2e 0a 5c 63 6f 64 |cur_bloc|k}..\cod|
|00001320| 65 7b 72 74 69 6d 65 7d | 20 69 73 20 74 68 65 20 |e{rtime}| is the |
|00001330| 74 69 6d 65 20 72 65 6c | 61 74 69 76 65 20 74 6f |time rel|ative to|
|00001340| 20 74 68 65 20 73 74 61 | 72 74 20 6f 66 20 74 68 | the sta|rt of th|
|00001350| 65 20 63 75 72 72 65 6e | 74 20 74 72 61 63 6b 3b |e curren|t track;|
|00001360| 0a 5c 63 6f 64 65 7b 61 | 74 69 6d 65 7d 20 69 73 |.\code{a|time} is|
|00001370| 20 74 68 65 20 74 69 6d | 65 20 72 65 6c 61 74 69 | the tim|e relati|
|00001380| 76 65 20 74 6f 20 74 68 | 65 20 62 65 67 69 6e 6e |ve to th|e beginn|
|00001390| 69 6e 67 20 6f 66 20 74 | 68 65 20 64 69 73 63 3b |ing of t|he disc;|
|000013a0| 0a 5c 63 6f 64 65 7b 74 | 74 69 6d 65 7d 20 69 73 |.\code{t|time} is|
|000013b0| 20 74 68 65 20 74 6f 74 | 61 6c 20 74 69 6d 65 20 | the tot|al time |
|000013c0| 6f 6e 20 74 68 65 20 64 | 69 73 63 2e 20 20 46 6f |on the d|isc. Fo|
|000013d0| 72 20 6d 6f 72 65 20 69 | 6e 66 6f 72 6d 61 74 69 |r more i|nformati|
|000013e0| 6f 6e 20 6f 6e 0a 74 68 | 65 20 6d 65 61 6e 69 6e |on on.th|e meanin|
|000013f0| 67 20 6f 66 20 74 68 65 | 20 76 61 6c 75 65 73 2c |g of the| values,|
|00001400| 20 73 65 65 20 74 68 65 | 20 6d 61 6e 75 61 6c 20 | see the| manual |
|00001410| 66 6f 72 20 43 44 67 65 | 74 73 74 61 74 75 73 2e |for CDge|tstatus.|
|00001420| 0a 54 68 65 20 76 61 6c | 75 65 20 6f 66 20 5c 63 |.The val|ue of \c|
|00001430| 6f 64 65 7b 73 74 61 74 | 65 7d 20 69 73 20 6f 6e |ode{stat|e} is on|
|00001440| 65 20 6f 66 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |e of the| followi|
|00001450| 6e 67 3a 20 5c 63 6f 64 | 65 7b 63 64 2e 45 52 52 |ng: \cod|e{cd.ERR|
|00001460| 4f 52 7d 2c 0a 5c 63 6f | 64 65 7b 63 64 2e 4e 4f |OR},.\co|de{cd.NO|
|00001470| 44 49 53 43 7d 2c 20 5c | 63 6f 64 65 7b 63 64 2e |DISC}, \|code{cd.|
|00001480| 52 45 41 44 59 7d 2c 20 | 5c 63 6f 64 65 7b 63 64 |READY}, |\code{cd|
|00001490| 2e 50 4c 41 59 49 4e 47 | 7d 2c 0a 5c 63 6f 64 65 |.PLAYING|},.\code|
|000014a0| 7b 63 64 2e 50 41 55 53 | 45 44 7d 2c 20 5c 63 6f |{cd.PAUS|ED}, \co|
|000014b0| 64 65 7b 63 64 2e 53 54 | 49 4c 4c 7d 2c 20 6f 72 |de{cd.ST|ILL}, or|
|000014c0| 20 5c 63 6f 64 65 7b 63 | 64 2e 43 44 52 4f 4d 7d | \code{c|d.CDROM}|
|000014d0| 2e 0a 5c 65 6e 64 7b 66 | 75 6e 63 64 65 73 63 7d |..\end{f|uncdesc}|
|000014e0| 0a 0a 5c 62 65 67 69 6e | 7b 66 75 6e 63 64 65 73 |..\begin|{funcdes|
|000014f0| 63 7d 7b 67 65 74 74 72 | 61 63 6b 69 6e 66 6f 7d |c}{gettr|ackinfo}|
|00001500| 7b 74 72 61 63 6b 7d 0a | 52 65 74 75 72 6e 73 20 |{track}.|Returns |
|00001510| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 61 62 6f 75 |informat|ion abou|
|00001520| 74 20 74 68 65 20 73 70 | 65 63 69 66 69 65 64 20 |t the sp|ecified |
|00001530| 74 72 61 63 6b 2e 20 20 | 54 68 65 20 72 65 74 75 |track. |The retu|
|00001540| 72 6e 65 64 0a 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |rned.inf|ormation|
|00001550| 20 69 73 20 61 20 74 75 | 70 6c 65 20 63 6f 6e 73 | is a tu|ple cons|
|00001560| 69 73 74 69 6e 67 20 6f | 66 20 74 77 6f 20 65 6c |isting o|f two el|
|00001570| 65 6d 65 6e 74 73 2c 20 | 74 68 65 20 73 74 61 72 |ements, |the star|
|00001580| 74 20 74 69 6d 65 20 6f | 66 0a 74 68 65 20 74 72 |t time o|f.the tr|
|00001590| 61 63 6b 20 61 6e 64 20 | 74 68 65 20 64 75 72 61 |ack and |the dura|
|000015a0| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 74 72 61 63 |tion of |the trac|
|000015b0| 6b 2e 0a 5c 65 6e 64 7b | 66 75 6e 63 64 65 73 63 |k..\end{|funcdesc|
|000015c0| 7d 0a 0a 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |}..\begi|n{funcde|
|000015d0| 73 63 7d 7b 6d 73 66 74 | 6f 62 6c 6f 63 6b 7d 7b |sc}{msft|oblock}{|
|000015e0| 6d 69 6e 5c 2c 20 73 65 | 63 5c 2c 20 66 72 61 6d |min\, se|c\, fram|
|000015f0| 65 7d 0a 43 6f 6e 76 65 | 72 74 73 20 61 20 6d 69 |e}.Conve|rts a mi|
|00001600| 6e 75 74 65 73 2c 20 73 | 65 63 6f 6e 64 73 2c 20 |nutes, s|econds, |
|00001610| 66 72 61 6d 65 73 20 74 | 72 69 70 6c 65 20 72 65 |frames t|riple re|
|00001620| 70 72 65 73 65 6e 74 69 | 6e 67 20 61 20 74 69 6d |presenti|ng a tim|
|00001630| 65 20 69 6e 0a 61 62 73 | 6f 6c 75 74 65 20 74 69 |e in.abs|olute ti|
|00001640| 6d 65 20 63 6f 64 65 20 | 69 6e 74 6f 20 74 68 65 |me code |into the|
|00001650| 20 63 6f 72 72 65 73 70 | 6f 6e 64 69 6e 67 20 6c | corresp|onding l|
|00001660| 6f 67 69 63 61 6c 20 62 | 6c 6f 63 6b 20 6e 75 6d |ogical b|lock num|
|00001670| 62 65 72 20 66 6f 72 20 | 74 68 65 0a 67 69 76 65 |ber for |the.give|
|00001680| 6e 20 43 44 2d 52 4f 4d | 20 64 72 69 76 65 2e 20 |n CD-ROM| drive. |
|00001690| 20 59 6f 75 20 73 68 6f | 75 6c 64 20 75 73 65 20 | You sho|uld use |
|000016a0| 5c 63 6f 64 65 7b 63 64 | 2e 6d 73 66 74 6f 66 72 |\code{cd|.msftofr|
|000016b0| 61 6d 65 28 29 7d 20 72 | 61 74 68 65 72 20 74 68 |ame()} r|ather th|
|000016c0| 61 6e 0a 5c 63 6f 64 65 | 7b 6d 73 66 74 6f 62 6c |an.\code|{msftobl|
|000016d0| 6f 63 6b 28 29 7d 20 66 | 6f 72 20 63 6f 6d 70 61 |ock()} f|or compa|
|000016e0| 72 69 6e 67 20 74 69 6d | 65 73 2e 20 20 54 68 65 |ring tim|es. The|
|000016f0| 20 6c 6f 67 69 63 61 6c | 20 62 6c 6f 63 6b 20 6e | logical| block n|
|00001700| 75 6d 62 65 72 0a 64 69 | 66 66 65 72 73 20 66 72 |umber.di|ffers fr|
|00001710| 6f 6d 20 74 68 65 20 66 | 72 61 6d 65 20 6e 75 6d |om the f|rame num|
|00001720| 62 65 72 20 62 79 20 61 | 6e 20 6f 66 66 73 65 74 |ber by a|n offset|
|00001730| 20 72 65 71 75 69 72 65 | 64 20 62 79 20 63 65 72 | require|d by cer|
|00001740| 74 61 69 6e 20 43 44 2d | 52 4f 4d 0a 64 72 69 76 |tain CD-|ROM.driv|
|00001750| 65 73 2e 0a 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |es..\end|{funcdes|
|00001760| 63 7d 0a 0a 5c 62 65 67 | 69 6e 7b 66 75 6e 63 64 |c}..\beg|in{funcd|
|00001770| 65 73 63 7d 7b 70 6c 61 | 79 7d 7b 73 74 61 72 74 |esc}{pla|y}{start|
|00001780| 5c 2c 20 70 6c 61 79 7d | 0a 53 74 61 72 74 73 20 |\, play}|.Starts |
|00001790| 70 6c 61 79 62 61 63 6b | 20 6f 66 20 61 6e 20 61 |playback| of an a|
|000017a0| 75 64 69 6f 20 43 44 20 | 69 6e 20 74 68 65 20 43 |udio CD |in the C|
|000017b0| 44 2d 52 4f 4d 20 64 72 | 69 76 65 20 61 74 20 74 |D-ROM dr|ive at t|
|000017c0| 68 65 20 73 70 65 63 69 | 66 69 65 64 0a 74 72 61 |he speci|fied.tra|
|000017d0| 63 6b 2e 20 20 54 68 65 | 20 61 75 64 69 6f 20 6f |ck. The| audio o|
|000017e0| 75 74 70 75 74 20 61 70 | 70 65 61 72 73 20 6f 6e |utput ap|pears on|
|000017f0| 20 74 68 65 20 43 44 2d | 52 4f 4d 20 64 72 69 76 | the CD-|ROM driv|
|00001800| 65 27 73 20 68 65 61 64 | 70 68 6f 6e 65 20 61 6e |e's head|phone an|
|00001810| 64 0a 61 75 64 69 6f 20 | 6a 61 63 6b 73 20 28 69 |d.audio |jacks (i|
|00001820| 66 20 66 69 74 74 65 64 | 29 2e 20 20 50 6c 61 79 |f fitted|). Play|
|00001830| 20 73 74 6f 70 73 20 61 | 74 20 74 68 65 20 65 6e | stops a|t the en|
|00001840| 64 20 6f 66 20 74 68 65 | 20 64 69 73 63 2e 0a 5c |d of the| disc..\|
|00001850| 63 6f 64 65 7b 73 74 61 | 72 74 7d 20 69 73 20 74 |code{sta|rt} is t|
|00001860| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 74 68 65 |he numbe|r of the|
|00001870| 20 74 72 61 63 6b 20 61 | 74 20 77 68 69 63 68 20 | track a|t which |
|00001880| 74 6f 20 73 74 61 72 74 | 20 70 6c 61 79 69 6e 67 |to start| playing|
|00001890| 20 74 68 65 0a 43 44 3b | 20 69 66 20 5c 63 6f 64 | the.CD;| if \cod|
|000018a0| 65 7b 70 6c 61 79 7d 20 | 69 73 20 30 2c 20 74 68 |e{play} |is 0, th|
|000018b0| 65 20 43 44 20 77 69 6c | 6c 20 62 65 20 73 65 74 |e CD wil|l be set|
|000018c0| 20 74 6f 20 61 6e 20 69 | 6e 69 74 69 61 6c 20 70 | to an i|nitial p|
|000018d0| 61 75 73 65 64 0a 73 74 | 61 74 65 2e 20 20 54 68 |aused.st|ate. Th|
|000018e0| 65 20 6d 65 74 68 6f 64 | 20 5c 63 6f 64 65 7b 74 |e method| \code{t|
|000018f0| 6f 67 67 6c 65 70 61 75 | 73 65 28 29 7d 20 63 61 |ogglepau|se()} ca|
|00001900| 6e 20 74 68 65 6e 20 62 | 65 20 75 73 65 64 20 74 |n then b|e used t|
|00001910| 6f 20 63 6f 6d 6d 65 6e | 63 65 0a 70 6c 61 79 2e |o commen|ce.play.|
|00001920| 0a 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 0a |.\end{fu|ncdesc}.|
|00001930| 0a 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|00001940| 7d 7b 70 6c 61 79 61 62 | 73 7d 7b 6d 69 6e 5c 2c |}{playab|s}{min\,|
|00001950| 20 73 65 63 5c 2c 20 66 | 72 61 6d 65 5c 2c 20 70 | sec\, f|rame\, p|
|00001960| 6c 61 79 7d 0a 4c 69 6b | 65 20 5c 63 6f 64 65 7b |lay}.Lik|e \code{|
|00001970| 70 6c 61 79 28 29 7d 2c | 20 65 78 63 65 70 74 20 |play()},| except |
|00001980| 74 68 61 74 20 74 68 65 | 20 73 74 61 72 74 20 69 |that the| start i|
|00001990| 73 20 67 69 76 65 6e 20 | 69 6e 20 6d 69 6e 75 74 |s given |in minut|
|000019a0| 65 73 2c 0a 73 65 63 6f | 6e 64 73 2c 20 66 72 61 |es,.seco|nds, fra|
|000019b0| 6d 65 73 20 69 6e 73 74 | 65 61 64 20 6f 66 20 61 |mes inst|ead of a|
|000019c0| 20 74 72 61 63 6b 20 6e | 75 6d 62 65 72 2e 0a 5c | track n|umber..\|
|000019d0| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 0a 0a 5c |end{func|desc}..\|
|000019e0| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|000019f0| 70 6c 61 79 74 72 61 63 | 6b 7d 7b 73 74 61 72 74 |playtrac|k}{start|
|00001a00| 5c 2c 20 70 6c 61 79 7d | 0a 4c 69 6b 65 20 5c 63 |\, play}|.Like \c|
|00001a10| 6f 64 65 7b 70 6c 61 79 | 28 29 7d 2c 20 65 78 63 |ode{play|()}, exc|
|00001a20| 65 70 74 20 74 68 61 74 | 20 70 6c 61 79 69 6e 67 |ept that| playing|
|00001a30| 20 73 74 6f 70 73 20 61 | 74 20 74 68 65 20 65 6e | stops a|t the en|
|00001a40| 64 20 6f 66 20 74 68 65 | 20 74 72 61 63 6b 2e 0a |d of the| track..|
|00001a50| 5c 65 6e 64 7b 66 75 6e | 63 64 65 73 63 7d 0a 0a |\end{fun|cdesc}..|
|00001a60| 5c 62 65 67 69 6e 7b 66 | 75 6e 63 64 65 73 63 7d |\begin{f|uncdesc}|
|00001a70| 7b 70 6c 61 79 74 72 61 | 63 6b 61 62 73 7d 7b 74 |{playtra|ckabs}{t|
|00001a80| 72 61 63 6b 5c 2c 20 6d | 69 6e 5c 2c 20 73 65 63 |rack\, m|in\, sec|
|00001a90| 5c 2c 20 66 72 61 6d 65 | 5c 2c 20 70 6c 61 79 7d |\, frame|\, play}|
|00001aa0| 0a 4c 69 6b 65 20 5c 63 | 6f 64 65 7b 70 6c 61 79 |.Like \c|ode{play|
|00001ab0| 28 29 7d 2c 20 65 78 63 | 65 70 74 20 74 68 61 74 |()}, exc|ept that|
|00001ac0| 20 70 6c 61 79 69 6e 67 | 20 62 65 67 69 6e 73 20 | playing| begins |
|00001ad0| 61 74 20 74 68 65 20 73 | 70 63 69 66 69 65 64 0a |at the s|pcified.|
|00001ae0| 61 62 73 6f 6c 75 74 65 | 20 74 69 6d 65 20 61 6e |absolute| time an|
|00001af0| 64 20 65 6e 64 73 20 61 | 74 20 74 68 65 20 65 6e |d ends a|t the en|
|00001b00| 64 20 6f 66 20 74 68 65 | 20 73 70 65 63 69 66 69 |d of the| specifi|
|00001b10| 65 64 20 74 72 61 63 6b | 2e 0a 5c 65 6e 64 7b 66 |ed track|..\end{f|
|00001b20| 75 6e 63 64 65 73 63 7d | 0a 0a 5c 62 65 67 69 6e |uncdesc}|..\begin|
|00001b30| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 70 72 65 76 65 |{funcdes|c}{preve|
|00001b40| 6e 74 72 65 6d 6f 76 61 | 6c 7d 7b 7d 0a 4c 6f 63 |ntremova|l}{}.Loc|
|00001b50| 6b 73 20 74 68 65 20 65 | 6a 65 63 74 20 62 75 74 |ks the e|ject but|
|00001b60| 74 6f 6e 20 6f 6e 20 74 | 68 65 20 43 44 2d 52 4f |ton on t|he CD-RO|
|00001b70| 4d 20 64 72 69 76 65 20 | 74 68 75 73 20 70 72 65 |M drive |thus pre|
|00001b80| 76 65 6e 74 69 6e 67 20 | 74 68 65 20 75 73 65 72 |venting |the user|
|00001b90| 0a 66 72 6f 6d 20 61 72 | 62 69 74 72 61 72 69 6c |.from ar|bitraril|
|00001ba0| 79 20 65 6a 65 63 74 69 | 6e 67 20 74 68 65 20 63 |y ejecti|ng the c|
|00001bb0| 61 64 64 79 2e 0a 5c 65 | 6e 64 7b 66 75 6e 63 64 |addy..\e|nd{funcd|
|00001bc0| 65 73 63 7d 0a 0a 5c 62 | 65 67 69 6e 7b 66 75 6e |esc}..\b|egin{fun|
|00001bd0| 63 64 65 73 63 7d 7b 72 | 65 61 64 64 61 7d 7b 6e |cdesc}{r|eadda}{n|
|00001be0| 75 6d 5f 66 72 61 6d 65 | 73 7d 0a 52 65 61 64 73 |um_frame|s}.Reads|
|00001bf0| 20 74 68 65 20 73 70 65 | 63 69 66 69 65 64 20 6e | the spe|cified n|
|00001c00| 75 6d 62 65 72 20 6f 66 | 20 66 72 61 6d 65 73 20 |umber of| frames |
|00001c10| 66 72 6f 6d 20 61 6e 20 | 61 75 64 69 6f 20 43 44 |from an |audio CD|
|00001c20| 20 6d 6f 75 6e 74 65 64 | 20 69 6e 20 74 68 65 0a | mounted| in the.|
|00001c30| 43 44 2d 52 4f 4d 20 64 | 72 69 76 65 2e 20 20 54 |CD-ROM d|rive. T|
|00001c40| 68 65 20 72 65 74 75 72 | 6e 20 76 61 6c 75 65 20 |he retur|n value |
|00001c50| 69 73 20 61 20 73 74 72 | 69 6e 67 20 72 65 70 72 |is a str|ing repr|
|00001c60| 65 73 65 6e 74 69 6e 67 | 20 74 68 65 20 61 75 64 |esenting| the aud|
|00001c70| 69 6f 0a 66 72 61 6d 65 | 73 2e 20 20 54 68 69 73 |io.frame|s. This|
|00001c80| 20 73 74 72 69 6e 67 20 | 63 61 6e 20 62 65 20 70 | string |can be p|
|00001c90| 61 73 73 65 64 20 75 6e | 61 6c 74 65 72 65 64 20 |assed un|altered |
|00001ca0| 74 6f 20 74 68 65 20 5c | 63 6f 64 65 7b 70 61 72 |to the \|code{par|
|00001cb0| 73 65 66 72 61 6d 65 7d | 0a 6d 65 74 68 6f 64 20 |seframe}|.method |
|00001cc0| 6f 66 20 74 68 65 20 70 | 61 72 73 65 72 20 6f 62 |of the p|arser ob|
|00001cd0| 6a 65 63 74 2e 0a 5c 65 | 6e 64 7b 66 75 6e 63 64 |ject..\e|nd{funcd|
|00001ce0| 65 73 63 7d 0a 0a 5c 62 | 65 67 69 6e 7b 66 75 6e |esc}..\b|egin{fun|
|00001cf0| 63 64 65 73 63 7d 7b 73 | 65 65 6b 7d 7b 6d 69 6e |cdesc}{s|eek}{min|
|00001d00| 5c 2c 20 73 65 63 5c 2c | 20 66 72 61 6d 65 7d 0a |\, sec\,| frame}.|
|00001d10| 53 65 74 73 20 74 68 65 | 20 70 6f 69 6e 74 65 72 |Sets the| pointer|
|00001d20| 20 74 68 61 74 20 69 6e | 64 69 63 61 74 65 73 20 | that in|dicates |
|00001d30| 74 68 65 20 73 74 61 72 | 74 69 6e 67 20 70 6f 69 |the star|ting poi|
|00001d40| 6e 74 20 6f 66 20 74 68 | 65 20 6e 65 78 74 20 72 |nt of th|e next r|
|00001d50| 65 61 64 20 6f 66 0a 64 | 69 67 69 74 61 6c 20 61 |ead of.d|igital a|
|00001d60| 75 64 69 6f 20 64 61 74 | 61 20 66 72 6f 6d 20 61 |udio dat|a from a|
|00001d70| 20 43 44 2d 52 4f 4d 2e | 20 20 54 68 65 20 70 6f | CD-ROM.| The po|
|00001d80| 69 6e 74 65 72 20 69 73 | 20 73 65 74 20 74 6f 20 |inter is| set to |
|00001d90| 61 6e 20 61 62 73 6f 6c | 75 74 65 0a 74 69 6d 65 |an absol|ute.time|
|00001da0| 20 63 6f 64 65 20 6c 6f | 63 61 74 69 6f 6e 20 73 | code lo|cation s|
|00001db0| 70 65 63 69 66 69 65 64 | 20 69 6e 20 6d 69 6e 75 |pecified| in minu|
|00001dc0| 74 65 73 2c 20 73 65 63 | 6f 6e 64 73 2c 20 61 6e |tes, sec|onds, an|
|00001dd0| 64 20 66 72 61 6d 65 73 | 2e 20 20 54 68 65 0a 72 |d frames|. The.r|
|00001de0| 65 74 75 72 6e 20 76 61 | 6c 75 65 20 69 73 20 74 |eturn va|lue is t|
|00001df0| 68 65 20 6c 6f 67 69 63 | 61 6c 20 62 6c 6f 63 6b |he logic|al block|
|00001e00| 20 6e 75 6d 62 65 72 20 | 74 6f 20 77 68 69 63 68 | number |to which|
|00001e10| 20 74 68 65 20 70 6f 69 | 6e 74 65 72 20 68 61 73 | the poi|nter has|
|00001e20| 20 62 65 65 6e 0a 73 65 | 74 2e 0a 5c 65 6e 64 7b | been.se|t..\end{|
|00001e30| 66 75 6e 63 64 65 73 63 | 7d 0a 0a 5c 62 65 67 69 |funcdesc|}..\begi|
|00001e40| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 73 65 65 6b |n{funcde|sc}{seek|
|00001e50| 62 6c 6f 63 6b 7d 7b 62 | 6c 6f 63 6b 7d 0a 53 65 |block}{b|lock}.Se|
|00001e60| 74 73 20 74 68 65 20 70 | 6f 69 6e 74 65 72 20 74 |ts the p|ointer t|
|00001e70| 68 61 74 20 69 6e 64 69 | 63 61 74 65 73 20 74 68 |hat indi|cates th|
|00001e80| 65 20 73 74 61 72 74 69 | 6e 67 20 70 6f 69 6e 74 |e starti|ng point|
|00001e90| 20 6f 66 20 74 68 65 20 | 6e 65 78 74 20 72 65 61 | of the |next rea|
|00001ea0| 64 20 6f 66 0a 64 69 67 | 69 74 61 6c 20 61 75 64 |d of.dig|ital aud|
|00001eb0| 69 6f 20 64 61 74 61 20 | 66 72 6f 6d 20 61 20 43 |io data |from a C|
|00001ec0| 44 2d 52 4f 4d 2e 20 20 | 54 68 65 20 70 6f 69 6e |D-ROM. |The poin|
|00001ed0| 74 65 72 20 69 73 20 73 | 65 74 20 74 6f 20 74 68 |ter is s|et to th|
|00001ee0| 65 20 73 70 65 63 69 66 | 69 65 64 0a 6c 6f 67 69 |e specif|ied.logi|
|00001ef0| 63 61 6c 20 62 6c 6f 63 | 6b 20 6e 75 6d 62 65 72 |cal bloc|k number|
|00001f00| 2e 20 20 54 68 65 20 72 | 65 74 75 72 6e 20 76 61 |. The r|eturn va|
|00001f10| 6c 75 65 20 69 73 20 74 | 68 65 20 6c 6f 67 69 63 |lue is t|he logic|
|00001f20| 61 6c 20 62 6c 6f 63 6b | 20 6e 75 6d 62 65 72 20 |al block| number |
|00001f30| 74 6f 0a 77 68 69 63 68 | 20 74 68 65 20 70 6f 69 |to.which| the poi|
|00001f40| 6e 74 65 72 20 68 61 73 | 20 62 65 65 6e 20 73 65 |nter has| been se|
|00001f50| 74 2e 0a 5c 65 6e 64 7b | 66 75 6e 63 64 65 73 63 |t..\end{|funcdesc|
|00001f60| 7d 0a 0a 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |}..\begi|n{funcde|
|00001f70| 73 63 7d 7b 73 65 65 6b | 74 72 61 63 6b 7d 7b 74 |sc}{seek|track}{t|
|00001f80| 72 61 63 6b 7d 0a 53 65 | 74 73 20 74 68 65 20 70 |rack}.Se|ts the p|
|00001f90| 6f 69 6e 74 65 72 20 74 | 68 61 74 20 69 6e 64 69 |ointer t|hat indi|
|00001fa0| 63 61 74 65 73 20 74 68 | 65 20 73 74 61 72 74 69 |cates th|e starti|
|00001fb0| 6e 67 20 70 6f 69 6e 74 | 20 6f 66 20 74 68 65 20 |ng point| of the |
|00001fc0| 6e 65 78 74 20 72 65 61 | 64 20 6f 66 0a 64 69 67 |next rea|d of.dig|
|00001fd0| 69 74 61 6c 20 61 75 64 | 69 6f 20 64 61 74 61 20 |ital aud|io data |
|00001fe0| 66 72 6f 6d 20 61 20 43 | 44 2d 52 4f 4d 2e 20 20 |from a C|D-ROM. |
|00001ff0| 54 68 65 20 70 6f 69 6e | 74 65 72 20 69 73 20 73 |The poin|ter is s|
|00002000| 65 74 20 74 6f 20 74 68 | 65 20 73 70 65 63 69 66 |et to th|e specif|
|00002010| 69 65 64 0a 74 72 61 63 | 6b 2e 20 20 54 68 65 20 |ied.trac|k. The |
|00002020| 72 65 74 75 72 6e 20 76 | 61 6c 75 65 20 69 73 20 |return v|alue is |
|00002030| 74 68 65 20 6c 6f 67 69 | 63 61 6c 20 62 6c 6f 63 |the logi|cal bloc|
|00002040| 6b 20 6e 75 6d 62 65 72 | 20 74 6f 20 77 68 69 63 |k number| to whic|
|00002050| 68 20 74 68 65 0a 70 6f | 69 6e 74 65 72 20 68 61 |h the.po|inter ha|
|00002060| 73 20 62 65 65 6e 20 73 | 65 74 2e 0a 5c 65 6e 64 |s been s|et..\end|
|00002070| 7b 66 75 6e 63 64 65 73 | 63 7d 0a 0a 5c 62 65 67 |{funcdes|c}..\beg|
|00002080| 69 6e 7b 66 75 6e 63 64 | 65 73 63 7d 7b 73 74 6f |in{funcd|esc}{sto|
|00002090| 70 7d 7b 7d 0a 53 74 6f | 70 73 20 74 68 65 20 63 |p}{}.Sto|ps the c|
|000020a0| 75 72 72 65 6e 74 20 70 | 6c 61 79 69 6e 67 20 6f |urrent p|laying o|
|000020b0| 70 65 72 61 74 69 6f 6e | 2e 0a 5c 65 6e 64 7b 66 |peration|..\end{f|
|000020c0| 75 6e 63 64 65 73 63 7d | 0a 0a 5c 62 65 67 69 6e |uncdesc}|..\begin|
|000020d0| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 74 6f 67 67 6c |{funcdes|c}{toggl|
|000020e0| 65 70 61 75 73 65 7d 7b | 7d 0a 50 61 75 73 65 73 |epause}{|}.Pauses|
|000020f0| 20 74 68 65 20 43 44 20 | 69 66 20 69 74 20 69 73 | the CD |if it is|
|00002100| 20 70 6c 61 79 69 6e 67 | 2c 20 61 6e 64 20 6d 61 | playing|, and ma|
|00002110| 6b 65 73 20 69 74 20 70 | 6c 61 79 20 69 66 20 69 |kes it p|lay if i|
|00002120| 74 20 69 73 20 70 61 75 | 73 65 64 2e 0a 5c 65 6e |t is pau|sed..\en|
|00002130| 64 7b 66 75 6e 63 64 65 | 73 63 7d 0a 0a 50 61 72 |d{funcde|sc}..Par|
|00002140| 73 65 72 20 6f 62 6a 65 | 63 74 73 20 28 72 65 74 |ser obje|cts (ret|
|00002150| 75 72 6e 65 64 20 62 79 | 20 5c 63 6f 64 65 7b 63 |urned by| \code{c|
|00002160| 64 2e 63 72 65 61 74 65 | 70 61 72 73 65 72 28 29 |d.create|parser()|
|00002170| 7d 29 20 68 61 76 65 20 | 74 68 65 0a 66 6f 6c 6c |}) have |the.foll|
|00002180| 6f 77 69 6e 67 20 6d 65 | 74 68 6f 64 73 3a 0a 0a |owing me|thods:..|
|00002190| 5c 72 65 6e 65 77 63 6f | 6d 6d 61 6e 64 7b 5c 69 |\renewco|mmand{\i|
|000021a0| 6e 64 65 78 73 75 62 69 | 74 65 6d 7d 7b 28 43 44 |ndexsubi|tem}{(CD|
|000021b0| 20 70 61 72 73 65 72 20 | 6f 62 6a 65 63 74 20 6d | parser |object m|
|000021c0| 65 74 68 6f 64 29 7d 0a | 0a 5c 62 65 67 69 6e 7b |ethod)}.|.\begin{|
|000021d0| 66 75 6e 63 64 65 73 63 | 7d 7b 61 64 64 63 61 6c |funcdesc|}{addcal|
|000021e0| 6c 62 61 63 6b 7d 7b 74 | 79 70 65 5c 2c 20 66 75 |lback}{t|ype\, fu|
|000021f0| 6e 63 5c 2c 20 61 72 67 | 7d 0a 41 64 64 73 20 61 |nc\, arg|}.Adds a|
|00002200| 20 63 61 6c 6c 62 61 63 | 6b 20 66 6f 72 20 74 68 | callbac|k for th|
|00002210| 65 20 70 61 72 73 65 72 | 2e 20 20 54 68 65 20 70 |e parser|. The p|
|00002220| 61 72 73 65 72 20 68 61 | 73 20 63 61 6c 6c 62 61 |arser ha|s callba|
|00002230| 63 6b 73 20 66 6f 72 20 | 65 69 67 68 74 0a 64 69 |cks for |eight.di|
|00002240| 66 66 65 72 65 6e 74 20 | 74 79 70 65 73 20 6f 66 |fferent |types of|
|00002250| 20 64 61 74 61 20 69 6e | 20 74 68 65 20 64 69 67 | data in| the dig|
|00002260| 69 74 61 6c 20 61 75 64 | 69 6f 20 64 61 74 61 20 |ital aud|io data |
|00002270| 73 74 72 65 61 6d 2e 20 | 20 43 6f 6e 73 74 61 6e |stream. | Constan|
|00002280| 74 73 0a 66 6f 72 20 74 | 68 65 73 65 20 74 79 70 |ts.for t|hese typ|
|00002290| 65 73 20 61 72 65 20 64 | 65 66 69 6e 65 64 20 61 |es are d|efined a|
|000022a0| 74 20 74 68 65 20 5c 63 | 6f 64 65 7b 63 64 7d 20 |t the \c|ode{cd} |
|000022b0| 6d 6f 64 75 6c 65 20 6c | 65 76 65 6c 20 28 73 65 |module l|evel (se|
|000022c0| 65 20 61 62 6f 76 65 29 | 2e 0a 54 68 65 20 63 61 |e above)|..The ca|
|000022d0| 6c 6c 62 61 63 6b 20 69 | 73 20 63 61 6c 6c 65 64 |llback i|s called|
|000022e0| 20 61 73 20 66 6f 6c 6c | 6f 77 73 3a 20 5c 63 6f | as foll|ows: \co|
|000022f0| 64 65 7b 66 75 6e 63 28 | 61 72 67 2c 20 74 79 70 |de{func(|arg, typ|
|00002300| 65 2c 20 64 61 74 61 29 | 7d 2c 20 77 68 65 72 65 |e, data)|}, where|
|00002310| 0a 5c 63 6f 64 65 7b 61 | 72 67 7d 20 69 73 20 74 |.\code{a|rg} is t|
|00002320| 68 65 20 75 73 65 72 20 | 73 75 70 70 6c 69 65 64 |he user |supplied|
|00002330| 20 61 72 67 75 6d 65 6e | 74 2c 20 5c 63 6f 64 65 | argumen|t, \code|
|00002340| 7b 74 79 70 65 7d 20 69 | 73 20 74 68 65 0a 70 61 |{type} i|s the.pa|
|00002350| 72 74 69 63 75 6c 61 72 | 20 74 79 70 65 20 6f 66 |rticular| type of|
|00002360| 20 63 61 6c 6c 62 61 63 | 6b 2c 20 61 6e 64 20 5c | callbac|k, and \|
|00002370| 63 6f 64 65 7b 64 61 74 | 61 7d 20 69 73 20 74 68 |code{dat|a} is th|
|00002380| 65 20 64 61 74 61 20 72 | 65 74 75 72 6e 65 64 20 |e data r|eturned |
|00002390| 66 6f 72 0a 74 68 69 73 | 20 5c 63 6f 64 65 7b 74 |for.this| \code{t|
|000023a0| 79 70 65 7d 20 6f 66 20 | 63 61 6c 6c 62 61 63 6b |ype} of |callback|
|000023b0| 2e 20 20 54 68 65 20 74 | 79 70 65 20 6f 66 20 74 |. The t|ype of t|
|000023c0| 68 65 20 64 61 74 61 20 | 64 65 70 65 6e 64 73 20 |he data |depends |
|000023d0| 6f 6e 20 74 68 65 0a 5c | 63 6f 64 65 7b 74 79 70 |on the.\|code{typ|
|000023e0| 65 7d 20 6f 66 20 63 61 | 6c 6c 62 61 63 6b 20 61 |e} of ca|llback a|
|000023f0| 73 20 66 6f 6c 6c 6f 77 | 73 3a 0a 5c 62 65 67 69 |s follow|s:.\begi|
|00002400| 6e 7b 64 65 73 63 72 69 | 70 74 69 6f 6e 7d 0a 5c |n{descri|ption}.\|
|00002410| 69 74 65 6d 5b 5c 63 6f | 64 65 7b 63 64 2e 61 75 |item[\co|de{cd.au|
|00002420| 64 69 6f 7d 3a 20 5d 0a | 54 68 65 20 61 72 67 75 |dio}: ].|The argu|
|00002430| 6d 65 6e 74 20 69 73 20 | 61 20 73 74 72 69 6e 67 |ment is |a string|
|00002440| 20 77 68 69 63 68 20 63 | 61 6e 20 62 65 20 70 61 | which c|an be pa|
|00002450| 73 73 65 64 20 75 6e 6d | 6f 64 69 66 69 65 64 20 |ssed unm|odified |
|00002460| 74 6f 0a 5c 63 6f 64 65 | 7b 61 6c 2e 77 72 69 74 |to.\code|{al.writ|
|00002470| 65 73 61 6d 70 73 28 29 | 7d 2e 0a 5c 69 74 65 6d |esamps()|}..\item|
|00002480| 5b 5c 63 6f 64 65 7b 63 | 64 2e 70 6e 75 6d 7d 3a |[\code{c|d.pnum}:|
|00002490| 20 5d 0a 54 68 65 20 61 | 72 67 75 6d 65 6e 74 20 | ].The a|rgument |
|000024a0| 69 73 20 61 6e 20 69 6e | 74 65 67 65 72 20 67 69 |is an in|teger gi|
|000024b0| 76 69 6e 67 20 74 68 65 | 20 70 72 6f 67 72 61 6d |ving the| program|
|000024c0| 20 28 74 72 61 63 6b 29 | 20 6e 75 6d 62 65 72 2e | (track)| number.|
|000024d0| 0a 5c 69 74 65 6d 5b 5c | 63 6f 64 65 7b 63 64 2e |.\item[\|code{cd.|
|000024e0| 69 6e 64 65 78 7d 3a 20 | 5d 0a 54 68 65 20 61 72 |index}: |].The ar|
|000024f0| 67 75 6d 65 6e 74 20 69 | 73 20 61 6e 20 69 6e 74 |gument i|s an int|
|00002500| 65 67 65 72 20 67 69 76 | 69 6e 67 20 74 68 65 20 |eger giv|ing the |
|00002510| 69 6e 64 65 78 20 6e 75 | 6d 62 65 72 2e 0a 5c 69 |index nu|mber..\i|
|00002520| 74 65 6d 5b 5c 63 6f 64 | 65 7b 63 64 2e 70 74 69 |tem[\cod|e{cd.pti|
|00002530| 6d 65 7d 3a 20 5d 0a 54 | 68 65 20 61 72 67 75 6d |me}: ].T|he argum|
|00002540| 65 6e 74 20 69 73 20 61 | 20 74 75 70 6c 65 20 63 |ent is a| tuple c|
|00002550| 6f 6e 73 69 73 74 69 6e | 67 20 6f 66 20 74 68 65 |onsistin|g of the|
|00002560| 20 70 72 6f 67 72 61 6d | 20 74 69 6d 65 20 69 6e | program| time in|
|00002570| 20 6d 69 6e 75 74 65 73 | 2c 0a 73 65 63 6f 6e 64 | minutes|,.second|
|00002580| 73 2c 20 61 6e 64 20 66 | 72 61 6d 65 73 2e 0a 5c |s, and f|rames..\|
|00002590| 69 74 65 6d 5b 5c 63 6f | 64 65 7b 63 64 2e 61 74 |item[\co|de{cd.at|
|000025a0| 69 6d 65 7d 3a 20 5d 0a | 54 68 65 20 61 72 67 75 |ime}: ].|The argu|
|000025b0| 6d 65 6e 74 20 69 73 20 | 61 20 74 75 70 6c 65 20 |ment is |a tuple |
|000025c0| 63 6f 6e 73 69 73 74 69 | 6e 67 20 6f 66 20 74 68 |consisti|ng of th|
|000025d0| 65 20 61 62 73 6f 6c 75 | 74 65 20 74 69 6d 65 20 |e absolu|te time |
|000025e0| 69 6e 20 6d 69 6e 75 74 | 65 73 2c 0a 73 65 63 6f |in minut|es,.seco|
|000025f0| 6e 64 73 2c 20 61 6e 64 | 20 66 72 61 6d 65 73 2e |nds, and| frames.|
|00002600| 0a 5c 69 74 65 6d 5b 5c | 63 6f 64 65 7b 63 64 2e |.\item[\|code{cd.|
|00002610| 63 61 74 61 6c 6f 67 7d | 3a 20 5d 0a 54 68 65 20 |catalog}|: ].The |
|00002620| 61 72 67 75 6d 65 6e 74 | 20 69 73 20 61 20 73 74 |argument| is a st|
|00002630| 72 69 6e 67 20 6f 66 20 | 31 33 20 63 68 61 72 61 |ring of |13 chara|
|00002640| 63 74 65 72 73 2c 20 67 | 69 76 69 6e 67 20 74 68 |cters, g|iving th|
|00002650| 65 20 63 61 74 61 6c 6f | 67 20 6e 75 6d 62 65 72 |e catalo|g number|
|00002660| 0a 6f 66 20 74 68 65 20 | 43 44 2e 0a 5c 69 74 65 |.of the |CD..\ite|
|00002670| 6d 5b 5c 63 6f 64 65 7b | 63 64 2e 69 64 65 6e 74 |m[\code{|cd.ident|
|00002680| 7d 3a 20 5d 0a 54 68 65 | 20 61 72 67 75 6d 65 6e |}: ].The| argumen|
|00002690| 74 20 69 73 20 61 20 73 | 74 72 69 6e 67 20 6f 66 |t is a s|tring of|
|000026a0| 20 31 32 20 63 68 61 72 | 61 63 74 65 72 73 2c 20 | 12 char|acters, |
|000026b0| 67 69 76 69 6e 67 20 74 | 68 65 20 49 53 52 43 0a |giving t|he ISRC.|
|000026c0| 69 64 65 6e 74 69 66 69 | 63 61 74 69 6f 6e 20 6e |identifi|cation n|
|000026d0| 75 6d 62 65 72 20 6f 66 | 20 74 68 65 20 72 65 63 |umber of| the rec|
|000026e0| 6f 72 64 69 6e 67 2e 20 | 20 54 68 65 20 73 74 72 |ording. | The str|
|000026f0| 69 6e 67 20 63 6f 6e 73 | 69 73 74 73 20 6f 66 20 |ing cons|ists of |
|00002700| 74 77 6f 0a 63 68 61 72 | 61 63 74 65 72 73 20 63 |two.char|acters c|
|00002710| 6f 75 6e 74 72 79 20 63 | 6f 64 65 2c 20 74 68 72 |ountry c|ode, thr|
|00002720| 65 65 20 63 68 61 72 61 | 63 74 65 72 73 20 6f 77 |ee chara|cters ow|
|00002730| 6e 65 72 20 63 6f 64 65 | 2c 20 74 77 6f 20 63 68 |ner code|, two ch|
|00002740| 61 72 61 63 74 65 72 73 | 0a 67 69 76 69 6e 67 20 |aracters|.giving |
|00002750| 74 68 65 20 79 65 61 72 | 2c 20 61 6e 64 20 66 69 |the year|, and fi|
|00002760| 76 65 20 63 68 61 72 61 | 63 74 65 72 73 20 67 69 |ve chara|cters gi|
|00002770| 76 69 6e 67 20 61 20 73 | 65 72 69 61 6c 20 6e 75 |ving a s|erial nu|
|00002780| 6d 62 65 72 2e 0a 5c 69 | 74 65 6d 5b 5c 63 6f 64 |mber..\i|tem[\cod|
|00002790| 65 7b 63 64 2e 63 6f 6e | 74 72 6f 6c 7d 3a 20 5d |e{cd.con|trol}: ]|
|000027a0| 0a 54 68 65 20 61 72 67 | 75 6d 65 6e 74 20 69 73 |.The arg|ument is|
|000027b0| 20 61 6e 20 69 6e 74 65 | 67 65 72 20 67 69 76 69 | an inte|ger givi|
|000027c0| 6e 67 20 74 68 65 20 63 | 6f 6e 74 72 6f 6c 20 62 |ng the c|ontrol b|
|000027d0| 69 74 73 20 66 72 6f 6d | 20 74 68 65 20 43 44 20 |its from| the CD |
|000027e0| 73 75 62 63 6f 64 65 0a | 64 61 74 61 2e 0a 5c 65 |subcode.|data..\e|
|000027f0| 6e 64 7b 64 65 73 63 72 | 69 70 74 69 6f 6e 7d 0a |nd{descr|iption}.|
|00002800| 5c 65 6e 64 7b 66 75 6e | 63 64 65 73 63 7d 0a 0a |\end{fun|cdesc}..|
|00002810| 5c 62 65 67 69 6e 7b 66 | 75 6e 63 64 65 73 63 7d |\begin{f|uncdesc}|
|00002820| 7b 64 65 6c 65 74 65 70 | 61 72 73 65 72 7d 7b 7d |{deletep|arser}{}|
|00002830| 0a 44 65 6c 65 74 65 73 | 20 74 68 65 20 70 61 72 |.Deletes| the par|
|00002840| 73 65 72 20 61 6e 64 20 | 66 72 65 65 73 20 74 68 |ser and |frees th|
|00002850| 65 20 6d 65 6d 6f 72 79 | 20 69 74 20 77 61 73 20 |e memory| it was |
|00002860| 75 73 69 6e 67 2e 20 20 | 54 68 65 20 6f 62 6a 65 |using. |The obje|
|00002870| 63 74 0a 73 68 6f 75 6c | 64 20 6e 6f 74 20 62 65 |ct.shoul|d not be|
|00002880| 20 75 73 65 64 20 61 66 | 74 65 72 20 74 68 69 73 | used af|ter this|
|00002890| 20 63 61 6c 6c 2e 20 20 | 54 68 69 73 20 63 61 6c | call. |This cal|
|000028a0| 6c 20 69 73 20 64 6f 6e | 65 20 61 75 74 6f 6d 61 |l is don|e automa|
|000028b0| 74 69 63 61 6c 6c 79 0a | 77 68 65 6e 20 74 68 65 |tically.|when the|
|000028c0| 20 6c 61 73 74 20 72 65 | 66 65 72 65 6e 63 65 20 | last re|ference |
|000028d0| 74 6f 20 74 68 65 20 6f | 62 6a 65 63 74 20 69 73 |to the o|bject is|
|000028e0| 20 72 65 6d 6f 76 65 64 | 2e 0a 5c 65 6e 64 7b 66 | removed|..\end{f|
|000028f0| 75 6e 63 64 65 73 63 7d | 0a 0a 5c 62 65 67 69 6e |uncdesc}|..\begin|
|00002900| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 70 61 72 73 65 |{funcdes|c}{parse|
|00002910| 66 72 61 6d 65 7d 7b 66 | 72 61 6d 65 7d 0a 50 61 |frame}{f|rame}.Pa|
|00002920| 72 73 65 73 20 6f 6e 65 | 20 6f 72 20 6d 6f 72 65 |rses one| or more|
|00002930| 20 66 72 61 6d 65 73 20 | 6f 66 20 64 69 67 69 74 | frames |of digit|
|00002940| 61 6c 20 61 75 64 69 6f | 20 64 61 74 61 20 66 72 |al audio| data fr|
|00002950| 6f 6d 20 61 20 43 44 20 | 73 75 63 68 20 61 73 0a |om a CD |such as.|
|00002960| 72 65 74 75 72 6e 65 64 | 20 62 79 20 5c 63 6f 64 |returned| by \cod|
|00002970| 65 7b 72 65 61 64 64 61 | 7d 2e 20 20 49 74 20 64 |e{readda|}. It d|
|00002980| 65 74 65 72 6d 69 6e 65 | 73 20 77 68 69 63 68 20 |etermine|s which |
|00002990| 73 75 62 63 6f 64 65 73 | 20 61 72 65 20 70 72 65 |subcodes| are pre|
|000029a0| 73 65 6e 74 0a 69 6e 20 | 74 68 65 20 64 61 74 61 |sent.in |the data|
|000029b0| 2e 20 20 49 66 20 74 68 | 65 73 65 20 73 75 62 63 |. If th|ese subc|
|000029c0| 6f 64 65 73 20 68 61 76 | 65 20 63 68 61 6e 67 65 |odes hav|e change|
|000029d0| 64 20 73 69 6e 63 65 20 | 74 68 65 20 6c 61 73 74 |d since |the last|
|000029e0| 20 66 72 61 6d 65 2c 0a | 74 68 65 6e 20 5c 63 6f | frame,.|then \co|
|000029f0| 64 65 7b 70 61 72 73 65 | 66 72 61 6d 65 7d 20 65 |de{parse|frame} e|
|00002a00| 78 65 63 75 74 65 73 20 | 61 20 63 61 6c 6c 62 61 |xecutes |a callba|
|00002a10| 63 6b 20 6f 66 20 74 68 | 65 20 61 70 70 72 6f 70 |ck of th|e approp|
|00002a20| 72 69 61 74 65 20 74 79 | 70 65 0a 70 61 73 73 69 |riate ty|pe.passi|
|00002a30| 6e 67 20 74 6f 20 69 74 | 20 74 68 65 20 73 75 62 |ng to it| the sub|
|00002a40| 63 6f 64 65 20 64 61 74 | 61 20 66 6f 75 6e 64 20 |code dat|a found |
|00002a50| 69 6e 20 74 68 65 20 66 | 72 61 6d 65 2e 0a 55 6e |in the f|rame..Un|
|00002a60| 6c 69 6b 65 20 74 68 65 | 20 43 20 66 75 6e 63 74 |like the| C funct|
|00002a70| 69 6f 6e 2c 20 6d 6f 72 | 65 20 74 68 61 6e 20 6f |ion, mor|e than o|
|00002a80| 6e 65 20 66 72 61 6d 65 | 20 6f 66 20 64 69 67 69 |ne frame| of digi|
|00002a90| 74 61 6c 20 61 75 64 69 | 6f 20 64 61 74 61 20 63 |tal audi|o data c|
|00002aa0| 61 6e 0a 62 65 20 70 61 | 73 73 65 64 20 74 6f 20 |an.be pa|ssed to |
|00002ab0| 74 68 69 73 20 6d 65 74 | 68 6f 64 2e 0a 5c 65 6e |this met|hod..\en|
|00002ac0| 64 7b 66 75 6e 63 64 65 | 73 63 7d 0a 0a 5c 62 65 |d{funcde|sc}..\be|
|00002ad0| 67 69 6e 7b 66 75 6e 63 | 64 65 73 63 7d 7b 72 65 |gin{func|desc}{re|
|00002ae0| 6d 6f 76 65 63 61 6c 6c | 62 61 63 6b 7d 7b 74 79 |movecall|back}{ty|
|00002af0| 70 65 7d 0a 52 65 6d 6f | 76 65 73 20 74 68 65 20 |pe}.Remo|ves the |
|00002b00| 63 61 6c 6c 62 61 63 6b | 20 66 6f 72 20 74 68 65 |callback| for the|
|00002b10| 20 67 69 76 65 6e 20 5c | 63 6f 64 65 7b 74 79 70 | given \|code{typ|
|00002b20| 65 7d 2e 0a 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |e}..\end|{funcdes|
|00002b30| 63 7d 0a 0a 5c 62 65 67 | 69 6e 7b 66 75 6e 63 64 |c}..\beg|in{funcd|
|00002b40| 65 73 63 7d 7b 72 65 73 | 65 74 70 61 72 73 65 72 |esc}{res|etparser|
|00002b50| 7d 7b 7d 0a 52 65 73 65 | 74 73 20 74 68 65 20 66 |}{}.Rese|ts the f|
|00002b60| 69 65 6c 64 73 20 6f 66 | 20 74 68 65 20 70 61 72 |ields of| the par|
|00002b70| 73 65 72 20 75 73 65 64 | 20 66 6f 72 20 74 72 61 |ser used| for tra|
|00002b80| 63 6b 69 6e 67 20 73 75 | 62 63 6f 64 65 73 20 74 |cking su|bcodes t|
|00002b90| 6f 20 61 6e 0a 69 6e 69 | 74 69 61 6c 20 73 74 61 |o an.ini|tial sta|
|00002ba0| 74 65 2e 20 20 5c 63 6f | 64 65 7b 72 65 73 65 74 |te. \co|de{reset|
|00002bb0| 70 61 72 73 65 72 7d 20 | 73 68 6f 75 6c 64 20 62 |parser} |should b|
|00002bc0| 65 20 63 61 6c 6c 65 64 | 20 61 66 74 65 72 20 74 |e called| after t|
|00002bd0| 68 65 20 64 69 73 63 20 | 68 61 73 0a 62 65 65 6e |he disc |has.been|
|00002be0| 20 63 68 61 6e 67 65 64 | 2e 0a 5c 65 6e 64 7b 66 | changed|..\end{f|
|00002bf0| 75 6e 63 64 65 73 63 7d | 0a |uncdesc}|. |
+--------+-------------------------+-------------------------+--------+--------+