home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / python / pytex / pytexdoc / lib2 / aifc / tex
LaTeX Document  |  1996-11-08  |  6.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


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

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% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 53 74 61 6e 64 61 72 |\section|{Standar|
|00000010| 64 20 4d 6f 64 75 6c 65 | 20 5c 73 65 63 74 63 6f |d Module| \sectco|
|00000020| 64 65 7b 61 69 66 63 7d | 7d 0a 5c 73 74 6d 6f 64 |de{aifc}|}.\stmod|
|00000030| 69 6e 64 65 78 7b 61 69 | 66 63 7d 0a 0a 54 68 69 |index{ai|fc}..Thi|
|00000040| 73 20 6d 6f 64 75 6c 65 | 20 70 72 6f 76 69 64 65 |s module| provide|
|00000050| 73 20 73 75 70 70 6f 72 | 74 20 66 6f 72 20 72 65 |s suppor|t for re|
|00000060| 61 64 69 6e 67 20 61 6e | 64 20 77 72 69 74 69 6e |ading an|d writin|
|00000070| 67 20 41 49 46 46 20 61 | 6e 64 20 41 49 46 46 2d |g AIFF a|nd AIFF-|
|00000080| 43 0a 66 69 6c 65 73 2e | 20 20 41 49 46 46 20 69 |C.files.| AIFF i|
|00000090| 73 20 41 75 64 69 6f 20 | 49 6e 74 65 72 63 68 61 |s Audio |Intercha|
|000000a0| 6e 67 65 20 46 69 6c 65 | 20 46 6f 72 6d 61 74 2c |nge File| Format,|
|000000b0| 20 61 20 66 6f 72 6d 61 | 74 20 66 6f 72 20 73 74 | a forma|t for st|
|000000c0| 6f 72 69 6e 67 0a 64 69 | 67 69 74 61 6c 20 61 75 |oring.di|gital au|
|000000d0| 64 69 6f 20 73 61 6d 70 | 6c 65 73 20 69 6e 20 61 |dio samp|les in a|
|000000e0| 20 66 69 6c 65 2e 20 20 | 41 49 46 46 2d 43 20 69 | file. |AIFF-C i|
|000000f0| 73 20 61 20 6e 65 77 65 | 72 20 76 65 72 73 69 6f |s a newe|r versio|
|00000100| 6e 20 6f 66 20 74 68 65 | 0a 66 6f 72 6d 61 74 20 |n of the|.format |
|00000110| 74 68 61 74 20 69 6e 63 | 6c 75 64 65 73 20 74 68 |that inc|ludes th|
|00000120| 65 20 61 62 69 6c 69 74 | 79 20 74 6f 20 63 6f 6d |e abilit|y to com|
|00000130| 70 72 65 73 73 20 74 68 | 65 20 61 75 64 69 6f 20 |press th|e audio |
|00000140| 64 61 74 61 2e 0a 0a 41 | 75 64 69 6f 20 66 69 6c |data...A|udio fil|
|00000150| 65 73 20 68 61 76 65 20 | 61 20 6e 75 6d 62 65 72 |es have |a number|
|00000160| 20 6f 66 20 70 61 72 61 | 6d 65 74 65 72 73 20 74 | of para|meters t|
|00000170| 68 61 74 20 64 65 73 63 | 72 69 62 65 20 74 68 65 |hat desc|ribe the|
|00000180| 20 61 75 64 69 6f 20 64 | 61 74 61 2e 0a 54 68 65 | audio d|ata..The|
|00000190| 20 73 61 6d 70 6c 69 6e | 67 20 72 61 74 65 20 6f | samplin|g rate o|
|000001a0| 72 20 66 72 61 6d 65 20 | 72 61 74 65 20 69 73 20 |r frame |rate is |
|000001b0| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 74 69 |the numb|er of ti|
|000001c0| 6d 65 73 20 70 65 72 20 | 73 65 63 6f 6e 64 20 74 |mes per |second t|
|000001d0| 68 65 0a 73 6f 75 6e 64 | 20 69 73 20 73 61 6d 70 |he.sound| is samp|
|000001e0| 6c 65 64 2e 20 20 54 68 | 65 20 6e 75 6d 62 65 72 |led. Th|e number|
|000001f0| 20 6f 66 20 63 68 61 6e | 6e 65 6c 73 20 69 6e 64 | of chan|nels ind|
|00000200| 69 63 61 74 65 20 69 66 | 20 74 68 65 20 61 75 64 |icate if| the aud|
|00000210| 69 6f 20 69 73 0a 6d 6f | 6e 6f 2c 20 73 74 65 72 |io is.mo|no, ster|
|00000220| 65 6f 2c 20 6f 72 20 71 | 75 61 64 72 6f 2e 20 20 |eo, or q|uadro. |
|00000230| 45 61 63 68 20 66 72 61 | 6d 65 20 63 6f 6e 73 69 |Each fra|me consi|
|00000240| 73 74 73 20 6f 66 20 6f | 6e 65 20 73 61 6d 70 6c |sts of o|ne sampl|
|00000250| 65 20 70 65 72 0a 63 68 | 61 6e 6e 65 6c 2e 20 20 |e per.ch|annel. |
|00000260| 54 68 65 20 73 61 6d 70 | 6c 65 20 73 69 7a 65 20 |The samp|le size |
|00000270| 69 73 20 74 68 65 20 73 | 69 7a 65 20 69 6e 20 62 |is the s|ize in b|
|00000280| 79 74 65 73 20 6f 66 20 | 65 61 63 68 20 73 61 6d |ytes of |each sam|
|00000290| 70 6c 65 2e 20 20 54 68 | 75 73 20 61 0a 66 72 61 |ple. Th|us a.fra|
|000002a0| 6d 65 20 63 6f 6e 73 69 | 73 74 73 20 6f 66 20 5c |me consi|sts of \|
|000002b0| 76 61 72 7b 6e 63 68 61 | 6e 6e 65 6c 73 7d 2a 5c |var{ncha|nnels}*\|
|000002c0| 76 61 72 7b 73 61 6d 70 | 6c 65 73 69 7a 65 7d 20 |var{samp|lesize} |
|000002d0| 62 79 74 65 73 2c 20 61 | 6e 64 20 61 0a 73 65 63 |bytes, a|nd a.sec|
|000002e0| 6f 6e 64 27 73 20 77 6f | 72 74 68 20 6f 66 20 61 |ond's wo|rth of a|
|000002f0| 75 64 69 6f 20 63 6f 6e | 73 69 73 74 73 20 6f 66 |udio con|sists of|
|00000300| 0a 5c 76 61 72 7b 6e 63 | 68 61 6e 6e 65 6c 73 7d |.\var{nc|hannels}|
|00000310| 2a 5c 76 61 72 7b 73 61 | 6d 70 6c 65 73 69 7a 65 |*\var{sa|mplesize|
|00000320| 7d 2a 5c 76 61 72 7b 66 | 72 61 6d 65 72 61 74 65 |}*\var{f|ramerate|
|00000330| 7d 20 62 79 74 65 73 2e | 0a 0a 46 6f 72 20 65 78 |} bytes.|..For ex|
|00000340| 61 6d 70 6c 65 2c 20 43 | 44 20 71 75 61 6c 69 74 |ample, C|D qualit|
|00000350| 79 20 61 75 64 69 6f 20 | 68 61 73 20 61 20 73 61 |y audio |has a sa|
|00000360| 6d 70 6c 65 20 73 69 7a | 65 20 6f 66 20 74 77 6f |mple siz|e of two|
|00000370| 20 62 79 74 65 73 20 28 | 31 36 0a 62 69 74 73 29 | bytes (|16.bits)|
|00000380| 2c 20 75 73 65 73 20 74 | 77 6f 20 63 68 61 6e 6e |, uses t|wo chann|
|00000390| 65 6c 73 20 28 73 74 65 | 72 65 6f 29 20 61 6e 64 |els (ste|reo) and|
|000003a0| 20 68 61 73 20 61 20 66 | 72 61 6d 65 20 72 61 74 | has a f|rame rat|
|000003b0| 65 20 6f 66 20 34 34 2c | 31 30 30 0a 66 72 61 6d |e of 44,|100.fram|
|000003c0| 65 73 2f 73 65 63 6f 6e | 64 2e 20 20 54 68 69 73 |es/secon|d. This|
|000003d0| 20 67 69 76 65 73 20 61 | 20 66 72 61 6d 65 20 73 | gives a| frame s|
|000003e0| 69 7a 65 20 6f 66 20 34 | 20 62 79 74 65 73 20 28 |ize of 4| bytes (|
|000003f0| 32 2a 32 29 2c 20 61 6e | 64 20 61 0a 73 65 63 6f |2*2), an|d a.seco|
|00000400| 6e 64 27 73 20 77 6f 72 | 74 68 20 6f 63 63 75 70 |nd's wor|th occup|
|00000410| 69 65 73 20 32 2a 32 2a | 34 34 31 30 30 20 62 79 |ies 2*2*|44100 by|
|00000420| 74 65 73 2c 20 69 2e 65 | 2e 5c 20 31 37 36 2c 34 |tes, i.e|.\ 176,4|
|00000430| 30 30 20 62 79 74 65 73 | 2e 0a 0a 4d 6f 64 75 6c |00 bytes|...Modul|
|00000440| 65 20 5c 63 6f 64 65 7b | 61 69 66 63 7d 20 64 65 |e \code{|aifc} de|
|00000450| 66 69 6e 65 73 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |fines th|e follow|
|00000460| 69 6e 67 20 66 75 6e 63 | 74 69 6f 6e 3a 0a 0a 5c |ing func|tion:..\|
|00000470| 72 65 6e 65 77 63 6f 6d | 6d 61 6e 64 7b 5c 69 6e |renewcom|mand{\in|
|00000480| 64 65 78 73 75 62 69 74 | 65 6d 7d 7b 28 69 6e 20 |dexsubit|em}{(in |
|00000490| 6d 6f 64 75 6c 65 20 61 | 69 66 63 29 7d 0a 5c 62 |module a|ifc)}.\b|
|000004a0| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 6f |egin{fun|cdesc}{o|
|000004b0| 70 65 6e 7d 7b 66 69 6c | 65 5c 2c 20 6d 6f 64 65 |pen}{fil|e\, mode|
|000004c0| 7d 0a 4f 70 65 6e 20 61 | 6e 20 41 49 46 46 20 6f |}.Open a|n AIFF o|
|000004d0| 72 20 41 49 46 46 2d 43 | 20 66 69 6c 65 20 61 6e |r AIFF-C| file an|
|000004e0| 64 20 72 65 74 75 72 6e | 20 61 6e 20 6f 62 6a 65 |d return| an obje|
|000004f0| 63 74 20 69 6e 73 74 61 | 6e 63 65 20 77 69 74 68 |ct insta|nce with|
|00000500| 0a 6d 65 74 68 6f 64 73 | 20 74 68 61 74 20 61 72 |.methods| that ar|
|00000510| 65 20 64 65 73 63 72 69 | 62 65 64 20 62 65 6c 6f |e descri|bed belo|
|00000520| 77 2e 20 20 54 68 65 20 | 61 72 67 75 6d 65 6e 74 |w. The |argument|
|00000530| 20 66 69 6c 65 20 69 73 | 20 65 69 74 68 65 72 20 | file is| either |
|00000540| 61 0a 73 74 72 69 6e 67 | 20 6e 61 6d 69 6e 67 20 |a.string| naming |
|00000550| 61 20 66 69 6c 65 20 6f | 72 20 61 20 66 69 6c 65 |a file o|r a file|
|00000560| 20 6f 62 6a 65 63 74 2e | 20 20 54 68 65 20 6d 6f | object.| The mo|
|00000570| 64 65 20 69 73 20 65 69 | 74 68 65 72 20 74 68 65 |de is ei|ther the|
|00000580| 20 73 74 72 69 6e 67 0a | 5c 63 6f 64 65 7b 27 72 | string.|\code{'r|
|00000590| 27 7d 20 77 68 65 6e 20 | 74 68 65 20 66 69 6c 65 |'} when |the file|
|000005a0| 20 6d 75 73 74 20 62 65 | 20 6f 70 65 6e 65 64 20 | must be| opened |
|000005b0| 66 6f 72 20 72 65 61 64 | 69 6e 67 2c 20 6f 72 20 |for read|ing, or |
|000005c0| 5c 63 6f 64 65 7b 27 77 | 27 7d 0a 77 68 65 6e 20 |\code{'w|'}.when |
|000005d0| 74 68 65 20 66 69 6c 65 | 20 6d 75 73 74 20 62 65 |the file| must be|
|000005e0| 20 6f 70 65 6e 65 64 20 | 66 6f 72 20 77 72 69 74 | opened |for writ|
|000005f0| 69 6e 67 2e 20 20 57 68 | 65 6e 20 75 73 65 64 20 |ing. Wh|en used |
|00000600| 66 6f 72 20 77 72 69 74 | 69 6e 67 2c 20 74 68 65 |for writ|ing, the|
|00000610| 0a 66 69 6c 65 20 6f 62 | 6a 65 63 74 20 73 68 6f |.file ob|ject sho|
|00000620| 75 6c 64 20 62 65 20 73 | 65 65 6b 61 62 6c 65 2c |uld be s|eekable,|
|00000630| 20 75 6e 6c 65 73 73 20 | 79 6f 75 20 6b 6e 6f 77 | unless |you know|
|00000640| 20 61 68 65 61 64 20 6f | 66 20 74 69 6d 65 20 68 | ahead o|f time h|
|00000650| 6f 77 20 6d 61 6e 79 0a | 73 61 6d 70 6c 65 73 20 |ow many.|samples |
|00000660| 79 6f 75 20 61 72 65 20 | 67 6f 69 6e 67 20 74 6f |you are |going to|
|00000670| 20 77 72 69 74 65 20 69 | 6e 20 74 6f 74 61 6c 20 | write i|n total |
|00000680| 61 6e 64 20 75 73 65 0a | 5c 63 6f 64 65 7b 77 72 |and use.|\code{wr|
|00000690| 69 74 65 66 72 61 6d 65 | 73 72 61 77 28 29 7d 20 |iteframe|sraw()} |
|000006a0| 61 6e 64 20 5c 63 6f 64 | 65 7b 73 65 74 6e 66 72 |and \cod|e{setnfr|
|000006b0| 61 6d 65 73 28 29 7d 2e | 0a 5c 65 6e 64 7b 66 75 |ames()}.|.\end{fu|
|000006c0| 6e 63 64 65 73 63 7d 0a | 0a 4f 62 6a 65 63 74 73 |ncdesc}.|.Objects|
|000006d0| 20 72 65 74 75 72 6e 65 | 64 20 62 79 20 5c 63 6f | returne|d by \co|
|000006e0| 64 65 7b 61 69 66 63 2e | 6f 70 65 6e 28 29 7d 20 |de{aifc.|open()} |
|000006f0| 77 68 65 6e 20 61 20 66 | 69 6c 65 20 69 73 20 6f |when a f|ile is o|
|00000700| 70 65 6e 65 64 20 66 6f | 72 0a 72 65 61 64 69 6e |pened fo|r.readin|
|00000710| 67 20 68 61 76 65 20 74 | 68 65 20 66 6f 6c 6c 6f |g have t|he follo|
|00000720| 77 69 6e 67 20 6d 65 74 | 68 6f 64 73 3a 0a 0a 5c |wing met|hods:..\|
|00000730| 72 65 6e 65 77 63 6f 6d | 6d 61 6e 64 7b 5c 69 6e |renewcom|mand{\in|
|00000740| 64 65 78 73 75 62 69 74 | 65 6d 7d 7b 28 61 69 66 |dexsubit|em}{(aif|
|00000750| 63 20 6f 62 6a 65 63 74 | 20 6d 65 74 68 6f 64 29 |c object| method)|
|00000760| 7d 0a 5c 62 65 67 69 6e | 7b 66 75 6e 63 64 65 73 |}.\begin|{funcdes|
|00000770| 63 7d 7b 67 65 74 6e 63 | 68 61 6e 6e 65 6c 73 7d |c}{getnc|hannels}|
|00000780| 7b 7d 0a 52 65 74 75 72 | 6e 20 74 68 65 20 6e 75 |{}.Retur|n the nu|
|00000790| 6d 62 65 72 20 6f 66 20 | 61 75 64 69 6f 20 63 68 |mber of |audio ch|
|000007a0| 61 6e 6e 65 6c 73 20 28 | 31 20 66 6f 72 20 6d 6f |annels (|1 for mo|
|000007b0| 6e 6f 2c 20 32 20 66 6f | 72 20 73 74 65 72 65 6f |no, 2 fo|r stereo|
|000007c0| 29 2e 0a 5c 65 6e 64 7b | 66 75 6e 63 64 65 73 63 |)..\end{|funcdesc|
|000007d0| 7d 0a 0a 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |}..\begi|n{funcde|
|000007e0| 73 63 7d 7b 67 65 74 73 | 61 6d 70 77 69 64 74 68 |sc}{gets|ampwidth|
|000007f0| 7d 7b 7d 0a 52 65 74 75 | 72 6e 20 74 68 65 20 73 |}{}.Retu|rn the s|
|00000800| 69 7a 65 20 69 6e 20 62 | 79 74 65 73 20 6f 66 20 |ize in b|ytes of |
|00000810| 69 6e 64 69 76 69 64 75 | 61 6c 20 73 61 6d 70 6c |individu|al sampl|
|00000820| 65 73 2e 0a 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |es..\end|{funcdes|
|00000830| 63 7d 0a 0a 5c 62 65 67 | 69 6e 7b 66 75 6e 63 64 |c}..\beg|in{funcd|
|00000840| 65 73 63 7d 7b 67 65 74 | 66 72 61 6d 65 72 61 74 |esc}{get|framerat|
|00000850| 65 7d 7b 7d 0a 52 65 74 | 75 72 6e 20 74 68 65 20 |e}{}.Ret|urn the |
|00000860| 73 61 6d 70 6c 69 6e 67 | 20 72 61 74 65 20 28 6e |sampling| rate (n|
|00000870| 75 6d 62 65 72 20 6f 66 | 20 61 75 64 69 6f 20 66 |umber of| audio f|
|00000880| 72 61 6d 65 73 20 70 65 | 72 20 73 65 63 6f 6e 64 |rames pe|r second|
|00000890| 29 2e 0a 5c 65 6e 64 7b | 66 75 6e 63 64 65 73 63 |)..\end{|funcdesc|
|000008a0| 7d 0a 0a 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |}..\begi|n{funcde|
|000008b0| 73 63 7d 7b 67 65 74 6e | 66 72 61 6d 65 73 7d 7b |sc}{getn|frames}{|
|000008c0| 7d 0a 52 65 74 75 72 6e | 20 74 68 65 20 6e 75 6d |}.Return| the num|
|000008d0| 62 65 72 20 6f 66 20 61 | 75 64 69 6f 20 66 72 61 |ber of a|udio fra|
|000008e0| 6d 65 73 20 69 6e 20 74 | 68 65 20 66 69 6c 65 2e |mes in t|he file.|
|000008f0| 0a 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 0a |.\end{fu|ncdesc}.|
|00000900| 0a 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|00000910| 7d 7b 67 65 74 63 6f 6d | 70 74 79 70 65 7d 7b 7d |}{getcom|ptype}{}|
|00000920| 0a 52 65 74 75 72 6e 20 | 61 20 66 6f 75 72 2d 63 |.Return |a four-c|
|00000930| 68 61 72 61 63 74 65 72 | 20 73 74 72 69 6e 67 20 |haracter| string |
|00000940| 64 65 73 63 72 69 62 69 | 6e 67 20 74 68 65 20 74 |describi|ng the t|
|00000950| 79 70 65 20 6f 66 20 63 | 6f 6d 70 72 65 73 73 69 |ype of c|ompressi|
|00000960| 6f 6e 20 75 73 65 64 0a | 69 6e 20 74 68 65 20 61 |on used.|in the a|
|00000970| 75 64 69 6f 20 66 69 6c | 65 2e 20 20 46 6f 72 20 |udio fil|e. For |
|00000980| 41 49 46 46 20 66 69 6c | 65 73 2c 20 74 68 65 20 |AIFF fil|es, the |
|00000990| 72 65 74 75 72 6e 65 64 | 20 76 61 6c 75 65 20 69 |returned| value i|
|000009a0| 73 0a 5c 63 6f 64 65 7b | 27 4e 4f 4e 45 27 7d 2e |s.\code{|'NONE'}.|
|000009b0| 0a 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 0a |.\end{fu|ncdesc}.|
|000009c0| 0a 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|000009d0| 7d 7b 67 65 74 63 6f 6d | 70 6e 61 6d 65 7d 7b 7d |}{getcom|pname}{}|
|000009e0| 0a 52 65 74 75 72 6e 20 | 61 20 68 75 6d 61 6e 2d |.Return |a human-|
|000009f0| 72 65 61 64 61 62 6c 65 | 20 64 65 73 63 72 69 70 |readable| descrip|
|00000a00| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 74 79 70 65 |tion of |the type|
|00000a10| 20 6f 66 20 63 6f 6d 70 | 72 65 73 73 69 6f 6e 20 | of comp|ression |
|00000a20| 75 73 65 64 20 69 6e 0a | 74 68 65 20 61 75 64 69 |used in.|the audi|
|00000a30| 6f 20 66 69 6c 65 2e 20 | 20 46 6f 72 20 41 49 46 |o file. | For AIF|
|00000a40| 46 20 66 69 6c 65 73 2c | 20 74 68 65 20 72 65 74 |F files,| the ret|
|00000a50| 75 72 6e 65 64 20 76 61 | 6c 75 65 20 69 73 20 5c |urned va|lue is \|
|00000a60| 63 6f 64 65 7b 27 6e 6f | 74 0a 63 6f 6d 70 72 65 |code{'no|t.compre|
|00000a70| 73 73 65 64 27 7d 2e 0a | 5c 65 6e 64 7b 66 75 6e |ssed'}..|\end{fun|
|00000a80| 63 64 65 73 63 7d 0a 0a | 5c 62 65 67 69 6e 7b 66 |cdesc}..|\begin{f|
|00000a90| 75 6e 63 64 65 73 63 7d | 7b 67 65 74 70 61 72 61 |uncdesc}|{getpara|
|00000aa0| 6d 73 7d 7b 7d 0a 52 65 | 74 75 72 6e 20 61 20 74 |ms}{}.Re|turn a t|
|00000ab0| 75 70 6c 65 20 63 6f 6e | 73 69 73 74 69 6e 67 20 |uple con|sisting |
|00000ac0| 6f 66 20 61 6c 6c 20 6f | 66 20 74 68 65 20 61 62 |of all o|f the ab|
|00000ad0| 6f 76 65 20 76 61 6c 75 | 65 73 20 69 6e 20 74 68 |ove valu|es in th|
|00000ae0| 65 20 61 62 6f 76 65 0a | 6f 72 64 65 72 2e 0a 5c |e above.|order..\|
|00000af0| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 0a 0a 5c |end{func|desc}..\|
|00000b00| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|00000b10| 67 65 74 6d 61 72 6b 65 | 72 73 7d 7b 7d 0a 52 65 |getmarke|rs}{}.Re|
|00000b20| 74 75 72 6e 20 61 20 6c | 69 73 74 20 6f 66 20 6d |turn a l|ist of m|
|00000b30| 61 72 6b 65 72 73 20 69 | 6e 20 74 68 65 20 61 75 |arkers i|n the au|
|00000b40| 64 69 6f 20 66 69 6c 65 | 2e 20 20 41 20 6d 61 72 |dio file|. A mar|
|00000b50| 6b 65 72 20 63 6f 6e 73 | 69 73 74 73 20 6f 66 20 |ker cons|ists of |
|00000b60| 61 0a 74 75 70 6c 65 20 | 6f 66 20 74 68 72 65 65 |a.tuple |of three|
|00000b70| 20 65 6c 65 6d 65 6e 74 | 73 2e 20 20 54 68 65 20 | element|s. The |
|00000b80| 66 69 72 73 74 20 69 73 | 20 74 68 65 20 6d 61 72 |first is| the mar|
|00000b90| 6b 20 49 44 20 28 61 6e | 20 69 6e 74 65 67 65 72 |k ID (an| integer|
|00000ba0| 29 2c 20 74 68 65 0a 73 | 65 63 6f 6e 64 20 69 73 |), the.s|econd is|
|00000bb0| 20 74 68 65 20 6d 61 72 | 6b 20 70 6f 73 69 74 69 | the mar|k positi|
|00000bc0| 6f 6e 20 69 6e 20 66 72 | 61 6d 65 73 20 66 72 6f |on in fr|ames fro|
|00000bd0| 6d 20 74 68 65 20 62 65 | 67 69 6e 6e 69 6e 67 20 |m the be|ginning |
|00000be0| 6f 66 20 74 68 65 20 64 | 61 74 61 0a 28 61 6e 20 |of the d|ata.(an |
|00000bf0| 69 6e 74 65 67 65 72 29 | 2c 20 74 68 65 20 74 68 |integer)|, the th|
|00000c00| 69 72 64 20 69 73 20 74 | 68 65 20 6e 61 6d 65 20 |ird is t|he name |
|00000c10| 6f 66 20 74 68 65 20 6d | 61 72 6b 20 28 61 20 73 |of the m|ark (a s|
|00000c20| 74 72 69 6e 67 29 2e 0a | 5c 65 6e 64 7b 66 75 6e |tring)..|\end{fun|
|00000c30| 63 64 65 73 63 7d 0a 0a | 5c 62 65 67 69 6e 7b 66 |cdesc}..|\begin{f|
|00000c40| 75 6e 63 64 65 73 63 7d | 7b 67 65 74 6d 61 72 6b |uncdesc}|{getmark|
|00000c50| 7d 7b 69 64 7d 0a 52 65 | 74 75 72 6e 20 74 68 65 |}{id}.Re|turn the|
|00000c60| 20 74 75 70 6c 65 20 61 | 73 20 64 65 73 63 72 69 | tuple a|s descri|
|00000c70| 62 65 64 20 69 6e 20 5c | 63 6f 64 65 7b 67 65 74 |bed in \|code{get|
|00000c80| 6d 61 72 6b 65 72 73 7d | 20 66 6f 72 20 74 68 65 |markers}| for the|
|00000c90| 20 6d 61 72 6b 20 77 69 | 74 68 0a 74 68 65 20 67 | mark wi|th.the g|
|00000ca0| 69 76 65 6e 20 69 64 2e | 0a 5c 65 6e 64 7b 66 75 |iven id.|.\end{fu|
|00000cb0| 6e 63 64 65 73 63 7d 0a | 0a 5c 62 65 67 69 6e 7b |ncdesc}.|.\begin{|
|00000cc0| 66 75 6e 63 64 65 73 63 | 7d 7b 72 65 61 64 66 72 |funcdesc|}{readfr|
|00000cd0| 61 6d 65 73 7d 7b 6e 66 | 72 61 6d 65 73 7d 0a 52 |ames}{nf|rames}.R|
|00000ce0| 65 61 64 20 61 6e 64 20 | 72 65 74 75 72 6e 20 74 |ead and |return t|
|00000cf0| 68 65 20 6e 65 78 74 20 | 5c 76 61 72 7b 6e 66 72 |he next |\var{nfr|
|00000d00| 61 6d 65 73 7d 20 66 72 | 61 6d 65 73 20 66 72 6f |ames} fr|ames fro|
|00000d10| 6d 20 74 68 65 20 61 75 | 64 69 6f 20 66 69 6c 65 |m the au|dio file|
|00000d20| 2e 20 20 54 68 65 0a 72 | 65 74 75 72 6e 65 64 20 |. The.r|eturned |
|00000d30| 64 61 74 61 20 69 73 20 | 61 20 73 74 72 69 6e 67 |data is |a string|
|00000d40| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 66 6f 72 20 | contain|ing for |
|00000d50| 65 61 63 68 20 66 72 61 | 6d 65 20 74 68 65 20 75 |each fra|me the u|
|00000d60| 6e 63 6f 6d 70 72 65 73 | 73 65 64 0a 73 61 6d 70 |ncompres|sed.samp|
|00000d70| 6c 65 73 20 6f 66 20 61 | 6c 6c 20 63 68 61 6e 6e |les of a|ll chann|
|00000d80| 65 6c 73 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |els..\en|d{funcde|
|00000d90| 73 63 7d 0a 0a 5c 62 65 | 67 69 6e 7b 66 75 6e 63 |sc}..\be|gin{func|
|00000da0| 64 65 73 63 7d 7b 72 65 | 77 69 6e 64 7d 7b 7d 0a |desc}{re|wind}{}.|
|00000db0| 52 65 77 69 6e 64 20 74 | 68 65 20 72 65 61 64 20 |Rewind t|he read |
|00000dc0| 70 6f 69 6e 74 65 72 2e | 20 20 54 68 65 20 6e 65 |pointer.| The ne|
|00000dd0| 78 74 20 5c 63 6f 64 65 | 7b 72 65 61 64 66 72 61 |xt \code|{readfra|
|00000de0| 6d 65 73 7d 20 77 69 6c | 6c 20 73 74 61 72 74 20 |mes} wil|l start |
|00000df0| 66 72 6f 6d 0a 74 68 65 | 20 62 65 67 69 6e 6e 69 |from.the| beginni|
|00000e00| 6e 67 2e 0a 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |ng..\end|{funcdes|
|00000e10| 63 7d 0a 0a 5c 62 65 67 | 69 6e 7b 66 75 6e 63 64 |c}..\beg|in{funcd|
|00000e20| 65 73 63 7d 7b 73 65 74 | 70 6f 73 7d 7b 70 6f 73 |esc}{set|pos}{pos|
|00000e30| 7d 0a 53 65 65 6b 20 74 | 6f 20 74 68 65 20 73 70 |}.Seek t|o the sp|
|00000e40| 65 63 69 66 69 65 64 20 | 66 72 61 6d 65 20 6e 75 |ecified |frame nu|
|00000e50| 6d 62 65 72 2e 0a 5c 65 | 6e 64 7b 66 75 6e 63 64 |mber..\e|nd{funcd|
|00000e60| 65 73 63 7d 0a 0a 5c 62 | 65 67 69 6e 7b 66 75 6e |esc}..\b|egin{fun|
|00000e70| 63 64 65 73 63 7d 7b 74 | 65 6c 6c 7d 7b 7d 0a 52 |cdesc}{t|ell}{}.R|
|00000e80| 65 74 75 72 6e 20 74 68 | 65 20 63 75 72 72 65 6e |eturn th|e curren|
|00000e90| 74 20 66 72 61 6d 65 20 | 6e 75 6d 62 65 72 2e 0a |t frame |number..|
|00000ea0| 5c 65 6e 64 7b 66 75 6e | 63 64 65 73 63 7d 0a 0a |\end{fun|cdesc}..|
|00000eb0| 5c 62 65 67 69 6e 7b 66 | 75 6e 63 64 65 73 63 7d |\begin{f|uncdesc}|
|00000ec0| 7b 63 6c 6f 73 65 7d 7b | 7d 0a 43 6c 6f 73 65 20 |{close}{|}.Close |
|00000ed0| 74 68 65 20 41 49 46 46 | 20 66 69 6c 65 2e 20 20 |the AIFF| file. |
|00000ee0| 41 66 74 65 72 20 63 61 | 6c 6c 69 6e 67 20 74 68 |After ca|lling th|
|00000ef0| 69 73 20 6d 65 74 68 6f | 64 2c 20 74 68 65 20 6f |is metho|d, the o|
|00000f00| 62 6a 65 63 74 20 63 61 | 6e 20 6e 6f 0a 6c 6f 6e |bject ca|n no.lon|
|00000f10| 67 65 72 20 62 65 20 75 | 73 65 64 2e 0a 5c 65 6e |ger be u|sed..\en|
|00000f20| 64 7b 66 75 6e 63 64 65 | 73 63 7d 0a 0a 4f 62 6a |d{funcde|sc}..Obj|
|00000f30| 65 63 74 73 20 72 65 74 | 75 72 6e 65 64 20 62 79 |ects ret|urned by|
|00000f40| 20 5c 63 6f 64 65 7b 61 | 69 66 63 2e 6f 70 65 6e | \code{a|ifc.open|
|00000f50| 28 29 7d 20 77 68 65 6e | 20 61 20 66 69 6c 65 20 |()} when| a file |
|00000f60| 69 73 20 6f 70 65 6e 65 | 64 20 66 6f 72 0a 77 72 |is opene|d for.wr|
|00000f70| 69 74 69 6e 67 20 68 61 | 76 65 20 61 6c 6c 20 74 |iting ha|ve all t|
|00000f80| 68 65 20 61 62 6f 76 65 | 20 6d 65 74 68 6f 64 73 |he above| methods|
|00000f90| 2c 20 65 78 63 65 70 74 | 20 66 6f 72 20 5c 63 6f |, except| for \co|
|00000fa0| 64 65 7b 72 65 61 64 66 | 72 61 6d 65 73 7d 20 61 |de{readf|rames} a|
|00000fb0| 6e 64 0a 5c 63 6f 64 65 | 7b 73 65 74 70 6f 73 7d |nd.\code|{setpos}|
|00000fc0| 2e 20 20 49 6e 20 61 64 | 64 69 74 69 6f 6e 20 74 |. In ad|dition t|
|00000fd0| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 6d 65 74 |he follo|wing met|
|00000fe0| 68 6f 64 73 20 65 78 69 | 73 74 2e 20 20 54 68 65 |hods exi|st. The|
|00000ff0| 0a 5c 63 6f 64 65 7b 67 | 65 74 7d 20 6d 65 74 68 |.\code{g|et} meth|
|00001000| 6f 64 73 20 63 61 6e 20 | 6f 6e 6c 79 20 62 65 20 |ods can |only be |
|00001010| 63 61 6c 6c 65 64 20 61 | 66 74 65 72 20 74 68 65 |called a|fter the|
|00001020| 20 63 6f 72 72 65 73 70 | 6f 6e 64 69 6e 67 0a 5c | corresp|onding.\|
|00001030| 63 6f 64 65 7b 73 65 74 | 7d 20 6d 65 74 68 6f 64 |code{set|} method|
|00001040| 73 20 68 61 76 65 20 62 | 65 65 6e 20 63 61 6c 6c |s have b|een call|
|00001050| 65 64 2e 20 20 42 65 66 | 6f 72 65 20 74 68 65 20 |ed. Bef|ore the |
|00001060| 66 69 72 73 74 0a 5c 63 | 6f 64 65 7b 77 72 69 74 |first.\c|ode{writ|
|00001070| 65 66 72 61 6d 65 73 7d | 20 6f 72 20 5c 63 6f 64 |eframes}| or \cod|
|00001080| 65 7b 77 72 69 74 65 66 | 72 61 6d 65 73 72 61 77 |e{writef|ramesraw|
|00001090| 7d 2c 20 61 6c 6c 20 70 | 61 72 61 6d 65 74 65 72 |}, all p|arameter|
|000010a0| 73 20 65 78 63 65 70 74 | 20 66 6f 72 0a 74 68 65 |s except| for.the|
|000010b0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 66 72 61 6d 65 | number |of frame|
|000010c0| 73 20 6d 75 73 74 20 62 | 65 20 66 69 6c 6c 65 64 |s must b|e filled|
|000010d0| 20 69 6e 2e 0a 0a 5c 62 | 65 67 69 6e 7b 66 75 6e | in...\b|egin{fun|
|000010e0| 63 64 65 73 63 7d 7b 61 | 69 66 66 7d 7b 7d 0a 43 |cdesc}{a|iff}{}.C|
|000010f0| 72 65 61 74 65 20 61 6e | 20 41 49 46 46 20 66 69 |reate an| AIFF fi|
|00001100| 6c 65 2e 20 20 54 68 65 | 20 64 65 66 61 75 6c 74 |le. The| default|
|00001110| 20 69 73 20 74 68 61 74 | 20 61 6e 20 41 49 46 46 | is that| an AIFF|
|00001120| 2d 43 20 66 69 6c 65 20 | 69 73 20 63 72 65 61 74 |-C file |is creat|
|00001130| 65 64 2c 0a 75 6e 6c 65 | 73 73 20 74 68 65 20 6e |ed,.unle|ss the n|
|00001140| 61 6d 65 20 6f 66 20 74 | 68 65 20 66 69 6c 65 20 |ame of t|he file |
|00001150| 65 6e 64 73 20 69 6e 20 | 27 2e 61 69 66 66 27 20 |ends in |'.aiff' |
|00001160| 69 6e 20 77 68 69 63 68 | 20 63 61 73 65 20 74 68 |in which| case th|
|00001170| 65 20 64 65 66 61 75 6c | 74 0a 69 73 20 61 6e 20 |e defaul|t.is an |
|00001180| 41 49 46 46 20 66 69 6c | 65 2e 0a 5c 65 6e 64 7b |AIFF fil|e..\end{|
|00001190| 66 75 6e 63 64 65 73 63 | 7d 0a 0a 5c 62 65 67 69 |funcdesc|}..\begi|
|000011a0| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 61 69 66 63 |n{funcde|sc}{aifc|
|000011b0| 7d 7b 7d 0a 43 72 65 61 | 74 65 20 61 6e 20 41 49 |}{}.Crea|te an AI|
|000011c0| 46 46 2d 43 20 66 69 6c | 65 2e 20 20 54 68 65 20 |FF-C fil|e. The |
|000011d0| 64 65 66 61 75 6c 74 20 | 69 73 20 74 68 61 74 20 |default |is that |
|000011e0| 61 6e 20 41 49 46 46 2d | 43 20 66 69 6c 65 20 69 |an AIFF-|C file i|
|000011f0| 73 20 63 72 65 61 74 65 | 64 2c 0a 75 6e 6c 65 73 |s create|d,.unles|
|00001200| 73 20 74 68 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 |s the na|me of th|
|00001210| 65 20 66 69 6c 65 20 65 | 6e 64 73 20 69 6e 20 27 |e file e|nds in '|
|00001220| 2e 61 69 66 66 27 20 69 | 6e 20 77 68 69 63 68 20 |.aiff' i|n which |
|00001230| 63 61 73 65 20 74 68 65 | 20 64 65 66 61 75 6c 74 |case the| default|
|00001240| 0a 69 73 20 61 6e 20 41 | 49 46 46 20 66 69 6c 65 |.is an A|IFF file|
|00001250| 2e 0a 5c 65 6e 64 7b 66 | 75 6e 63 64 65 73 63 7d |..\end{f|uncdesc}|
|00001260| 0a 0a 5c 62 65 67 69 6e | 7b 66 75 6e 63 64 65 73 |..\begin|{funcdes|
|00001270| 63 7d 7b 73 65 74 6e 63 | 68 61 6e 6e 65 6c 73 7d |c}{setnc|hannels}|
|00001280| 7b 6e 63 68 61 6e 6e 65 | 6c 73 7d 0a 53 70 65 63 |{nchanne|ls}.Spec|
|00001290| 69 66 79 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f |ify the |number o|
|000012a0| 66 20 63 68 61 6e 6e 65 | 6c 73 20 69 6e 20 74 68 |f channe|ls in th|
|000012b0| 65 20 61 75 64 69 6f 20 | 66 69 6c 65 2e 0a 5c 65 |e audio |file..\e|
|000012c0| 6e 64 7b 66 75 6e 63 64 | 65 73 63 7d 0a 0a 5c 62 |nd{funcd|esc}..\b|
|000012d0| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 73 |egin{fun|cdesc}{s|
|000012e0| 65 74 73 61 6d 70 77 69 | 64 74 68 7d 7b 77 69 64 |etsampwi|dth}{wid|
|000012f0| 74 68 7d 0a 53 70 65 63 | 69 66 79 20 74 68 65 20 |th}.Spec|ify the |
|00001300| 73 69 7a 65 20 69 6e 20 | 62 79 74 65 73 20 6f 66 |size in |bytes of|
|00001310| 20 61 75 64 69 6f 20 73 | 61 6d 70 6c 65 73 2e 0a | audio s|amples..|
|00001320| 5c 65 6e 64 7b 66 75 6e | 63 64 65 73 63 7d 0a 0a |\end{fun|cdesc}..|
|00001330| 5c 62 65 67 69 6e 7b 66 | 75 6e 63 64 65 73 63 7d |\begin{f|uncdesc}|
|00001340| 7b 73 65 74 66 72 61 6d | 65 72 61 74 65 7d 7b 72 |{setfram|erate}{r|
|00001350| 61 74 65 7d 0a 53 70 65 | 63 69 66 79 20 74 68 65 |ate}.Spe|cify the|
|00001360| 20 73 61 6d 70 6c 69 6e | 67 20 66 72 65 71 75 65 | samplin|g freque|
|00001370| 6e 63 79 20 69 6e 20 66 | 72 61 6d 65 73 20 70 65 |ncy in f|rames pe|
|00001380| 72 20 73 65 63 6f 6e 64 | 2e 0a 5c 65 6e 64 7b 66 |r second|..\end{f|
|00001390| 75 6e 63 64 65 73 63 7d | 0a 0a 5c 62 65 67 69 6e |uncdesc}|..\begin|
|000013a0| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 73 65 74 6e 66 |{funcdes|c}{setnf|
|000013b0| 72 61 6d 65 73 7d 7b 6e | 66 72 61 6d 65 73 7d 0a |rames}{n|frames}.|
|000013c0| 53 70 65 63 69 66 79 20 | 74 68 65 20 6e 75 6d 62 |Specify |the numb|
|000013d0| 65 72 20 6f 66 20 66 72 | 61 6d 65 73 20 74 68 61 |er of fr|ames tha|
|000013e0| 74 20 61 72 65 20 74 6f | 20 62 65 20 77 72 69 74 |t are to| be writ|
|000013f0| 74 65 6e 20 74 6f 20 74 | 68 65 20 61 75 64 69 6f |ten to t|he audio|
|00001400| 20 66 69 6c 65 2e 0a 49 | 66 20 74 68 69 73 20 70 | file..I|f this p|
|00001410| 61 72 61 6d 65 74 65 72 | 20 69 73 20 6e 6f 74 20 |arameter| is not |
|00001420| 73 65 74 2c 20 6f 72 20 | 6e 6f 74 20 73 65 74 20 |set, or |not set |
|00001430| 63 6f 72 72 65 63 74 6c | 79 2c 20 74 68 65 20 66 |correctl|y, the f|
|00001440| 69 6c 65 20 6e 65 65 64 | 73 20 74 6f 0a 73 75 70 |ile need|s to.sup|
|00001450| 70 6f 72 74 20 73 65 65 | 6b 69 6e 67 2e 0a 5c 65 |port see|king..\e|
|00001460| 6e 64 7b 66 75 6e 63 64 | 65 73 63 7d 0a 0a 5c 62 |nd{funcd|esc}..\b|
|00001470| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 73 |egin{fun|cdesc}{s|
|00001480| 65 74 63 6f 6d 70 74 79 | 70 65 7d 7b 74 79 70 65 |etcompty|pe}{type|
|00001490| 5c 2c 20 6e 61 6d 65 7d | 0a 53 70 65 63 69 66 79 |\, name}|.Specify|
|000014a0| 20 74 68 65 20 63 6f 6d | 70 72 65 73 73 69 6f 6e | the com|pression|
|000014b0| 20 74 79 70 65 2e 20 20 | 49 66 20 6e 6f 74 20 73 | type. |If not s|
|000014c0| 70 65 63 69 66 69 65 64 | 2c 20 74 68 65 20 61 75 |pecified|, the au|
|000014d0| 64 69 6f 20 64 61 74 61 | 20 77 69 6c 6c 0a 6e 6f |dio data| will.no|
|000014e0| 74 20 62 65 20 63 6f 6d | 70 72 65 73 73 65 64 2e |t be com|pressed.|
|000014f0| 20 20 49 6e 20 41 49 46 | 46 20 66 69 6c 65 73 2c | In AIF|F files,|
|00001500| 20 63 6f 6d 70 72 65 73 | 73 69 6f 6e 20 69 73 20 | compres|sion is |
|00001510| 6e 6f 74 20 70 6f 73 73 | 69 62 6c 65 2e 20 20 54 |not poss|ible. T|
|00001520| 68 65 0a 6e 61 6d 65 20 | 70 61 72 61 6d 65 74 65 |he.name |paramete|
|00001530| 72 20 73 68 6f 75 6c 64 | 20 62 65 20 61 20 68 75 |r should| be a hu|
|00001540| 6d 61 6e 2d 72 65 61 64 | 61 62 6c 65 20 64 65 73 |man-read|able des|
|00001550| 63 72 69 70 74 69 6f 6e | 20 6f 66 20 74 68 65 0a |cription| of the.|
|00001560| 63 6f 6d 70 72 65 73 73 | 69 6f 6e 20 74 79 70 65 |compress|ion type|
|00001570| 2c 20 74 68 65 20 74 79 | 70 65 20 70 61 72 61 6d |, the ty|pe param|
|00001580| 65 74 65 72 20 73 68 6f | 75 6c 64 20 62 65 20 61 |eter sho|uld be a|
|00001590| 20 66 6f 75 72 2d 63 68 | 61 72 61 63 74 65 72 0a | four-ch|aracter.|
|000015a0| 73 74 72 69 6e 67 2e 20 | 20 43 75 72 72 65 6e 74 |string. | Current|
|000015b0| 6c 79 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |ly the f|ollowing|
|000015c0| 20 63 6f 6d 70 72 65 73 | 73 69 6f 6e 20 74 79 70 | compres|sion typ|
|000015d0| 65 73 20 61 72 65 20 73 | 75 70 70 6f 72 74 65 64 |es are s|upported|
|000015e0| 3a 0a 4e 4f 4e 45 2c 20 | 55 4c 41 57 2c 20 41 4c |:.NONE, |ULAW, AL|
|000015f0| 41 57 2c 20 47 37 32 32 | 2e 0a 5c 65 6e 64 7b 66 |AW, G722|..\end{f|
|00001600| 75 6e 63 64 65 73 63 7d | 0a 0a 5c 62 65 67 69 6e |uncdesc}|..\begin|
|00001610| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 73 65 74 70 61 |{funcdes|c}{setpa|
|00001620| 72 61 6d 73 7d 7b 6e 63 | 68 61 6e 6e 65 6c 73 5c |rams}{nc|hannels\|
|00001630| 2c 20 73 61 6d 70 77 69 | 64 74 68 5c 2c 20 66 72 |, sampwi|dth\, fr|
|00001640| 61 6d 65 72 61 74 65 5c | 2c 20 63 6f 6d 70 74 79 |amerate\|, compty|
|00001650| 70 65 5c 2c 20 63 6f 6d | 70 6e 61 6d 65 7d 0a 53 |pe\, com|pname}.S|
|00001660| 65 74 20 61 6c 6c 20 74 | 68 65 20 61 62 6f 76 65 |et all t|he above|
|00001670| 20 70 61 72 61 6d 65 74 | 65 72 73 20 61 74 20 6f | paramet|ers at o|
|00001680| 6e 63 65 2e 20 20 54 68 | 65 20 61 72 67 75 6d 65 |nce. Th|e argume|
|00001690| 6e 74 20 69 73 20 61 20 | 74 75 70 6c 65 0a 63 6f |nt is a |tuple.co|
|000016a0| 6e 73 69 73 74 69 6e 67 | 20 6f 66 20 74 68 65 20 |nsisting| of the |
|000016b0| 76 61 72 69 6f 75 73 20 | 70 61 72 61 6d 65 74 65 |various |paramete|
|000016c0| 72 73 2e 20 20 54 68 69 | 73 20 6d 65 61 6e 73 20 |rs. Thi|s means |
|000016d0| 74 68 61 74 20 69 74 20 | 69 73 20 70 6f 73 73 69 |that it |is possi|
|000016e0| 62 6c 65 0a 74 6f 20 75 | 73 65 20 74 68 65 20 72 |ble.to u|se the r|
|000016f0| 65 73 75 6c 74 20 6f 66 | 20 61 20 5c 63 6f 64 65 |esult of| a \code|
|00001700| 7b 67 65 74 70 61 72 61 | 6d 73 7d 20 63 61 6c 6c |{getpara|ms} call|
|00001710| 20 61 73 20 61 72 67 75 | 6d 65 6e 74 20 74 6f 0a | as argu|ment to.|
|00001720| 5c 63 6f 64 65 7b 73 65 | 74 70 61 72 61 6d 73 7d |\code{se|tparams}|
|00001730| 2e 0a 5c 65 6e 64 7b 66 | 75 6e 63 64 65 73 63 7d |..\end{f|uncdesc}|
|00001740| 0a 0a 5c 62 65 67 69 6e | 7b 66 75 6e 63 64 65 73 |..\begin|{funcdes|
|00001750| 63 7d 7b 73 65 74 6d 61 | 72 6b 7d 7b 69 64 5c 2c |c}{setma|rk}{id\,|
|00001760| 20 70 6f 73 5c 2c 20 6e | 61 6d 65 7d 0a 41 64 64 | pos\, n|ame}.Add|
|00001770| 20 61 20 6d 61 72 6b 20 | 77 69 74 68 20 74 68 65 | a mark |with the|
|00001780| 20 67 69 76 65 6e 20 69 | 64 20 28 6c 61 72 67 65 | given i|d (large|
|00001790| 72 20 74 68 61 6e 20 30 | 29 2c 20 61 6e 64 20 74 |r than 0|), and t|
|000017a0| 68 65 20 67 69 76 65 6e | 20 6e 61 6d 65 20 61 74 |he given| name at|
|000017b0| 0a 74 68 65 20 67 69 76 | 65 6e 20 70 6f 73 69 74 |.the giv|en posit|
|000017c0| 69 6f 6e 2e 20 20 54 68 | 69 73 20 6d 65 74 68 6f |ion. Th|is metho|
|000017d0| 64 20 63 61 6e 20 62 65 | 20 63 61 6c 6c 65 64 20 |d can be| called |
|000017e0| 61 74 20 61 6e 79 20 74 | 69 6d 65 20 62 65 66 6f |at any t|ime befo|
|000017f0| 72 65 0a 5c 63 6f 64 65 | 7b 63 6c 6f 73 65 7d 2e |re.\code|{close}.|
|00001800| 0a 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 0a |.\end{fu|ncdesc}.|
|00001810| 0a 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|00001820| 7d 7b 74 65 6c 6c 7d 7b | 7d 0a 52 65 74 75 72 6e |}{tell}{|}.Return|
|00001830| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 77 72 69 | the cur|rent wri|
|00001840| 74 65 20 70 6f 73 69 74 | 69 6f 6e 20 69 6e 20 74 |te posit|ion in t|
|00001850| 68 65 20 6f 75 74 70 75 | 74 20 66 69 6c 65 2e 20 |he outpu|t file. |
|00001860| 20 55 73 65 66 75 6c 20 | 69 6e 0a 63 6f 6d 62 69 | Useful |in.combi|
|00001870| 6e 61 74 69 6f 6e 20 77 | 69 74 68 20 5c 63 6f 64 |nation w|ith \cod|
|00001880| 65 7b 73 65 74 6d 61 72 | 6b 7d 2e 0a 5c 65 6e 64 |e{setmar|k}..\end|
|00001890| 7b 66 75 6e 63 64 65 73 | 63 7d 0a 0a 5c 62 65 67 |{funcdes|c}..\beg|
|000018a0| 69 6e 7b 66 75 6e 63 64 | 65 73 63 7d 7b 77 72 69 |in{funcd|esc}{wri|
|000018b0| 74 65 66 72 61 6d 65 73 | 7d 7b 64 61 74 61 7d 0a |teframes|}{data}.|
|000018c0| 57 72 69 74 65 20 64 61 | 74 61 20 74 6f 20 74 68 |Write da|ta to th|
|000018d0| 65 20 6f 75 74 70 75 74 | 20 66 69 6c 65 2e 20 20 |e output| file. |
|000018e0| 54 68 69 73 20 6d 65 74 | 68 6f 64 20 63 61 6e 20 |This met|hod can |
|000018f0| 6f 6e 6c 79 20 62 65 20 | 63 61 6c 6c 65 64 20 61 |only be |called a|
|00001900| 66 74 65 72 0a 74 68 65 | 20 61 75 64 69 6f 20 66 |fter.the| audio f|
|00001910| 69 6c 65 20 70 61 72 61 | 6d 65 74 65 72 73 20 68 |ile para|meters h|
|00001920| 61 76 65 20 62 65 65 6e | 20 73 65 74 2e 0a 5c 65 |ave been| set..\e|
|00001930| 6e 64 7b 66 75 6e 63 64 | 65 73 63 7d 0a 0a 5c 62 |nd{funcd|esc}..\b|
|00001940| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 77 |egin{fun|cdesc}{w|
|00001950| 72 69 74 65 66 72 61 6d | 65 73 72 61 77 7d 7b 64 |ritefram|esraw}{d|
|00001960| 61 74 61 7d 0a 4c 69 6b | 65 20 5c 63 6f 64 65 7b |ata}.Lik|e \code{|
|00001970| 77 72 69 74 65 66 72 61 | 6d 65 73 7d 2c 20 65 78 |writefra|mes}, ex|
|00001980| 63 65 70 74 20 74 68 61 | 74 20 74 68 65 20 68 65 |cept tha|t the he|
|00001990| 61 64 65 72 20 6f 66 20 | 74 68 65 20 61 75 64 69 |ader of |the audi|
|000019a0| 6f 20 66 69 6c 65 20 69 | 73 0a 6e 6f 74 20 75 70 |o file i|s.not up|
|000019b0| 64 61 74 65 64 2e 0a 5c | 65 6e 64 7b 66 75 6e 63 |dated..\|end{func|
|000019c0| 64 65 73 63 7d 0a 0a 5c | 62 65 67 69 6e 7b 66 75 |desc}..\|begin{fu|
|000019d0| 6e 63 64 65 73 63 7d 7b | 63 6c 6f 73 65 7d 7b 7d |ncdesc}{|close}{}|
|000019e0| 0a 43 6c 6f 73 65 20 74 | 68 65 20 41 49 46 46 20 |.Close t|he AIFF |
|000019f0| 66 69 6c 65 2e 20 20 54 | 68 65 20 68 65 61 64 65 |file. T|he heade|
|00001a00| 72 20 6f 66 20 74 68 65 | 20 66 69 6c 65 20 69 73 |r of the| file is|
|00001a10| 20 75 70 64 61 74 65 64 | 20 74 6f 20 72 65 66 6c | updated| to refl|
|00001a20| 65 63 74 20 74 68 65 0a | 61 63 74 75 61 6c 20 73 |ect the.|actual s|
|00001a30| 69 7a 65 20 6f 66 20 74 | 68 65 20 61 75 64 69 6f |ize of t|he audio|
|00001a40| 20 64 61 74 61 2e 20 41 | 66 74 65 72 20 63 61 6c | data. A|fter cal|
|00001a50| 6c 69 6e 67 20 74 68 69 | 73 20 6d 65 74 68 6f 64 |ling thi|s method|
|00001a60| 2c 20 74 68 65 20 6f 62 | 6a 65 63 74 0a 63 61 6e |, the ob|ject.can|
|00001a70| 20 6e 6f 20 6c 6f 6e 67 | 65 72 20 62 65 20 75 73 | no long|er be us|
|00001a80| 65 64 2e 0a 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |ed..\end|{funcdes|
|00001a90| 63 7d 0a | |c}. | |
+--------+-------------------------+-------------------------+--------+--------+