Issue1373643
Created on 2005年12月05日 16:42 by wingel, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files |
| File name |
Uploaded |
Description |
Edit |
|
chunk.diff
|
wingel,
2005年12月05日 16:42
|
Patch to chunk.py |
| Messages (2) |
|
msg49167 - (view) |
Author: Christer Weinigel (wingel) |
Date: 2005年12月05日 16:42 |
chunk.py unpacks the chunk size as a signed long 'l'
not as unsigned long 'L' which is what it ought to do
according to the WAV specs. Additionally, since field
contains a byte count it makes no sense for it to be
signed.
What I want to do is to read a wave file generated by
madplay on the fly. Since madplay doesn't know the
size of the WAVE chunk when it is written, it sets the
chunk size to 0xffff which is inpreted as -1 by
chunk.py . Changing chunk.py to read it as an unsigned
long makes this work.
Example code:
import wave
import os
f = os.popen('madplay -o wave:- foo.mp3')
wf = wave.open(f, 'rb')
Without a patch, this will raise an error:
wave.Error: not a WAVE file
|
|
msg49168 - (view) |
Author: Georg Brandl (georg.brandl) * (Python committer) |
Date: 2006年02月18日 21:11 |
Logged In: YES
user_id=1188172
Thanks for the report. Committed revisions 42464, 42465 (2.4).
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2022年04月11日 14:56:14 | admin | set | github: 42661 |
| 2005年12月05日 16:42:45 | wingel | create |