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
270 # _comptype -- the AIFF-C compression type ('NONE' if AIFF)
272 # _compname -- the human-readable AIFF-C compression type
282 # _version -- the AIFF-C version number
285 # _aifc -- 1 iff reading an AIFF-C file
302 if formdata == 'AIFF':
307 raise Error, 'not an AIFF or AIFF-C file'
500 raise Error, 'cannot read compressed AIFF-C files'
542 # _comptype -- the AIFF-C compression type ('NONE' in AIFF)
544 # _compname -- the human-readable AIFF-C compression type
554 # _aifc -- whether we're writing an AIFF-C file or an AIFF file
556 # aiff() method
559 # _version -- the AIFF-C version number
573 if filename[-5:] == '.aiff':
594 self._aifc = 1 # AIFF-C is default
603 def aiff(self):
816 raise Error, 'cannot write compressed AIFF-C files'
869 self._file.write('AIFF')
963 sys.argv.append('/usr/demos/data/audio/bach.aiff')