[Pythonmac-SIG] Audio_mac.py fails in writeframes

2007-10-11 Thread punch
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.

I've searched all around and found one guy on the net with this problem 
but no answer. I can over-ride the writeframes method but what should 
extSH be?

Any help appreciated.

-- 

bill

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Audio_mac.py fails in writeframes

2007-10-11 Thread Jack Jansen


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, [EMAIL PROTECTED], http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma  
Goldman



___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig