summaryrefslogtreecommitdiffstats
path: root/Lib/aifc.py
diff options
context:
space:
mode:
authorSjoerd Mullender <sjoerd@acm.org>1993-02-05 13:43:44 (GMT)
committerSjoerd Mullender <sjoerd@acm.org>1993-02-05 13:43:44 (GMT)
commit4ab6ff80ffd847c7bb98ddc50a9a6c21e8d45744 (patch)
treefbece7336f1b3bb3a0aea6677be373b2cc9e35ed /Lib/aifc.py
parent6f5afc9a73d7388bf96df69323589f2f82c110ba (diff)
downloadcpython-4ab6ff80ffd847c7bb98ddc50a9a6c21e8d45744.zip
cpython-4ab6ff80ffd847c7bb98ddc50a9a6c21e8d45744.tar.gz
cpython-4ab6ff80ffd847c7bb98ddc50a9a6c21e8d45744.tar.bz2
AWARE.py: New file with definitions for Aware Inc.'s compression
algorithms in cl module. aifc.py: fixed a small bug.
Diffstat (limited to 'Lib/aifc.py')
-rw-r--r--Lib/aifc.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/aifc.py b/Lib/aifc.py
index 63849a1..4e919d4 100644
--- a/Lib/aifc.py
+++ b/Lib/aifc.py
@@ -506,7 +506,8 @@ class Aifc_read():
return ''
data = self._ssnd_chunk.read(nframes * self._framesize)
if self._decomp and data:
- self._decomp.SetParam(CL.FRAME_BUFFER_SIZE, len(data) * 2)
+ dummy = self._decomp.SetParam(CL.FRAME_BUFFER_SIZE, \
+ len(data) * 2)
data = self._decomp.Decompress(len(data) / self._nchannels, data)
self._soundpos = self._soundpos + len(data) / (self._nchannels * self._sampwidth)
return data
@@ -638,7 +639,7 @@ class Aifc_write():
def setnchannels(self, nchannels):
if self._nframeswritten:
raise Error, 'cannot change parameters after starting to write'
- dummy = _convert(nchannels, _nchannelslist)
+ dummy = _convert2(nchannels, _nchannelslist)
self._nchannels = nchannels
def getnchannels(self):
@@ -756,8 +757,9 @@ class Aifc_write():
self._write_header(len(data))
nframes = len(data) / (self._sampwidth * self._nchannels)
if self._comp:
- self._comp.SetParam(CL.FRAME_BUFFER_SIZE, len(data))
- self._comp.SetParam(CL.COMPRESSED_BUFFER_SIZE, \
+ dummy = self._comp.SetParam(CL.FRAME_BUFFER_SIZE, \
+ len(data))
+ dummy = self._comp.SetParam(CL.COMPRESSED_BUFFER_SIZE,\
len(data))
data = self._comp.Compress(nframes, data)
self._file.write(data)