14.5.2 Wave_write Objects
Wave_write objects, as returned by open(), have the
following methods:
-
Make sure nframes is correct, and close the file.
This method is called upon deletion.
-
Set the number of channels.
-
Set the sample width to n bytes.
-
Set the frame rate to n.
-
Set the number of frames to n. This will be changed later if
more frames are written.
-
Set the compression type and description.
-
The tuple should be
(nchannels, sampwidth,
framerate, nframes, comptype, compname)
, with
values valid for the set*() methods. Sets all parameters.
-
Return current position in the file, with the same disclaimer for
the Wave_read.tell() and Wave_read.setpos()
methods.
-
Write audio frames, without correcting nframes.
-
Write audio frames and make sure nframes is correct.
Note that it is invalid to set any parameters after calling
writeframes() or writeframesraw(), and any attempt
to do so will raise wave.Error.
Release 2.5a0, documentation updated on August 30, 2005.
See About this document... for information on suggesting changes.