[Pythonmac-SIG] Audio_mac.py fails in writeframes

Jack Jansen Jack.Jansen at cwi.nl
Thu Oct 11 23:04:22 CEST 2007

On  11-Oct-2007, at 18:51 , punch wrote:

> I'm running 'OS X' 10.4.10 and python 2.5.1 on a MacBook Pro SR.  
> When I
> try to run any of the audio demos, specifically Audio_mac.py, I get
> errors. The error is in the writeframes method. It appears to try and
> pack the constant extSH (set to 0xFF) as a signed byte, which it  
> cannot do.

Change the struct.pack format from 'llHhllbbl' to 'llHhllBBl'.

The code predates the distinction between signed and unsigned bytes  
in struct.pack.

But be warned that this also shows how well-maintained the code is:-)
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20071011/d3332e95/attachment.htm 

More information about the Pythonmac-SIG mailing list