could it be possible due to using
from the docs:
That's exactly what you get - single element tuple, so this should return just the first element
struct.unpack()
?from the docs:
Quote:struct.unpack(format, buffer)
Unpack from the buffer buffer (presumably packed by pack(format, ...)) according to the format string format. The result is a tuple even if it contains exactly one item. The buffer’s size in bytes must match the size required by the format, as reflected by calcsize().
That's exactly what you get - single element tuple, so this should return just the first element
struct.unpack('<i', wavHeader[13:17])[0]
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs