24 bit signed integer binary conversion help needed

Robert Somerville rsomerville at sjgeophysics.com
Fri Jan 8 17:25:38 EST 2010


thanks Grant, your sext24 function does the trick (this Python newbie 
thanks you a lot ...)

so i loop on d=wave.readframes(1)
  call dd=sext24(d) on the frame read , then
   ddd=struct.unpack("<%ul" % 1 ,dd)
  unpack(dd)  the output of sext24 into a 32bit integer (seems to do the 
trick correctly for signed 24 bit     integers ....)
-thanks , bob




More information about the Python-list mailing list