File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -515,7 +515,7 @@ def _read_comm_chunk(self, chunk):
515515 self ._nchannels = _read_short (chunk )
516516 self ._nframes = _read_long (chunk )
517517 self ._sampwidth = (_read_short (chunk ) + 7 ) / 8
518- self ._framerate = _read_float (chunk )
518+ self ._framerate = int ( _read_float (chunk ) )
519519 self ._framesize = self ._nchannels * self ._sampwidth
520520 if self ._aifc :
521521 #DEBUG: SGI's soundeditor produces a bad size :-(
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ def readframes(self, nframes):
254254 if nframes == AUDIO_UNKNOWN_SIZE :
255255 data = self ._file .read ()
256256 else :
257- data = self ._file .read (nframes * self ._sampwidth * self ._nchannels )
257+ data = self ._file .read (nframes * self ._framesize * self ._nchannels )
258258 if self ._encoding == AUDIO_FILE_ENCODING_MULAW_8 :
259259 import audioop
260260 data = audioop .ulaw2lin (data , self ._sampwidth )
You can’t perform that action at this time.
0 commit comments