Home | History | Annotate | Download | only in Lib

Lines Matching defs:aiff

1 """Stuff to parse AIFF-C and AIFF files.

4 both for AIFF-C files and AIFF files.
6 An AIFF-C file has the following structure.
21 An AIFF file has the string "AIFF" instead of "AIFC".
30 <version number of AIFF-C defining document> (AIFF-C only).
43 in AIFF-C files only:
56 Reading AIFF files:
69 getcomptype() -- returns compression type ('NONE' for AIFF files)
71 compression type ('not compressed' for AIFF files)
89 Writing AIFF files:
96 aiff() -- create an AIFF file (AIFF-C default)
97 aifc() -- create an AIFF-C file
131 When a file is opened with the extension '.aiff', an AIFF file is
132 written, otherwise an AIFF-C file is written. This default can be
133 changed by calling aiff() or aifc() before the first writeframes or
145 _AIFC_version = 0xA2805140L # Version 1 of AIFF-C
258 # _comptype -- the AIFF-C compression type ('NONE' if AIFF)
260 # _compname -- the human-readable AIFF-C compression type
270 # _version -- the AIFF-C version number
273 # _aifc -- 1 iff reading an AIFF-C file
290 if formdata == 'AIFF':
295 raise Error, 'not an AIFF or AIFF-C file'
485 raise Error, 'cannot read compressed AIFF-C files'
528 # _comptype -- the AIFF-C compression type ('NONE' in AIFF)
530 # _compname -- the human-readable AIFF-C compression type
540 # _aifc -- whether we're writing an AIFF-C file or an AIFF file
542 # aiff() method
545 # _version -- the AIFF-C version number
559 if filename[-5:] == '.aiff':
580 self._aifc = 1 # AIFF-C is default
589 def aiff(self):
796 raise Error, 'cannot write compressed AIFF-C files'
846 self._file.write('AIFF')
935 sys.argv.append('/usr/demos/data/audio/bach.aiff')