On Sun, 2007-02-04 at 12:17 -0200, Silver Rock wrote: > hallo, > > supose i´ve opened a sound with the wave module: > > >>> import wave > >>> sound=wave.open(filename,'rb') > > now this is strange: > > >>> sound.getnframes() != len(sound.readframes(sound.getnframes()) > True > > Why so?
The documentation says
readframes(
n)
Reads and returns at most n frames of audio, as a string of
bytes.
Note the "at most n frames". Most I/O functions work like this, they try
to give you as much data as you request but if they get interrupted by a
signal or something else they may return less than that. What happens if
you call readframes() again?
--ll
signature.asc
Description: This is a digitally signed message part
