GNU Info

Info Node: (python2.1-lib.info)AU_write Objects

(python2.1-lib.info)AU_write Objects


Prev: AU_read Objects Up: sunau
Enter node , (file) or (file)node

AU_write Objects
----------------

AU_write objects, as returned by `open()' above, have the following
methods:

`setnchannels(n)'
     Set the number of channels.

`setsampwidth(n)'
     Set the sample width (in bytes.)

`setframerate(n)'
     Set the frame rate.

`setnframes(n)'
     Set the number of frames. This can be later changed, when and if
     more frames are written.

`setcomptype(type, name)'
     Set the compression type and description.  Only `'NONE'' and
     `'ULAW'' are supported on output.

`setparams(tuple)'
     The TUPLE should be `(NCHANNELS, SAMPWIDTH, FRAMERATE, NFRAMES,
     COMPTYPE, COMPNAME)', with values valid for the `set*()' methods.
     Set all parameters.

`tell()'
     Return current position in the file, with the same disclaimer for
     the `AU_read.tell()' and `AU_read.setpos()' methods.

`writeframesraw(data)'
     Write audio frames, without correcting NFRAMES.

`writeframes(data)'
     Write audio frames and make sure NFRAMES is correct.

`close()'
     Make sure NFRAMES is correct, and close the file.

     This method is called upon deletion.

Note that it is invalid to set any parameters after calling
`writeframes()' or `writeframesraw()'.


automatically generated by info2www version 1.2.2.9