PyDocs

Nav

Multimedia Services

Wave_write

wave

class (source)
  • Wave_write(f)
Variables used in this class:

These variables are user settable through appropriate methods
of this class:
_file -- the open file with methods write(), close(), tell(), seek()
          set through the __init__() method
_comptype -- the AIFF-C compression type ('NONE' in AIFF)
          set through the setcomptype() or setparams() method
_compname -- the human-readable AIFF-C compression type
          set through the setcomptype() or setparams() method
_nchannels -- the number of audio channels
          set through the setnchannels() or setparams() method
_sampwidth -- the number of bytes per audio sample
          set through the setsampwidth() or setparams() method
_framerate -- the sampling frequency
          set through the setframerate() or setparams() method
_format -- frame format
          set through setformat() method
_nframes -- the number of audio frames written to the header
          set through the setnframes() or setparams() method

These variables are used internally only:
_datalength -- the size of the audio samples written to the header
_nframeswritten -- the number of frames actually written
_datawritten -- the size of the audio samples actually written
Changed in 3.4
  • 3.4: Added support for unseekable files.
Members of Wave_write

c

close
Make sure nframes is correct, and close the file if it was opened by wave.

g

getcompname
Return the human-readable compression type name.
getcomptype
Return the compression type ('NONE').
getformat
Return the current frame format code.
getframerate
Return the frame rate.
getnchannels
Return the number of channels.
getnframes
Return the number of audio frames written so far.
getparams
Return a namedtuple() (nchannels, sampwidth, framerate, nframes, comptype, compname) containing the current output parameters.
getsampwidth
Return the sample width in bytes.

s

setcomptype
Set the compression type and description.
setformat
Set the frame format code.
setframerate
Set the frame rate to n.
setnchannels
Set the number of channels.
setnframes
Set the number of frames to n.
setparams
The tuple should be (nchannels, sampwidth, framerate, nframes, comptype, compname, format), with values valid for the set*() methods.
setsampwidth
Set the sample width to n bytes.

t

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

w

writeframes
Write audio frames and make sure nframes is correct.
writeframesraw
Write audio frames, without correcting nframes.
0 Examples
No examples for wave/Wave_write.
See Also
No see-alsos for wave/Wave_write
0 Notes
No notes for Wave_write