Message131583
PlaySound supposedly lets you play a .WAV file whose contents are stored in a string, by passing the string and flags including winsound.SND_MEMORY. I'm trying to use BytesIO object and the wave module to make a file in-memory, and pass this to winsound. It's a TypeError if I pass the resultant bytes object directly, and if I pass a string object, I get
TypeError: must be str without null character or None, not str
Since wav files can contain zeros, for the feature to work at all, the C code would need to detect the SND_MEMORY flag and interpret the first argument as a bytes object, instead of a null-terminated string, in that case. |
|
Date |
User |
Action |
Args |
2011-03-21 00:34:41 | Tom.Felker | set | recipients:
+ Tom.Felker |
2011-03-21 00:34:41 | Tom.Felker | set | messageid: <1300667681.04.0.269037633009.issue11620@psf.upfronthosting.co.za> |
2011-03-21 00:34:40 | Tom.Felker | link | issue11620 messages |
2011-03-21 00:34:40 | Tom.Felker | create | |
|