This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Tom.Felker
Recipients Tom.Felker
Date 2011-03-21.00:34:40
SpamBayes Score 5.3533844e-12
Marked as misclassified No
Message-id <1300667681.04.0.269037633009.issue11620@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-03-21 00:34:41Tom.Felkersetrecipients: + Tom.Felker
2011-03-21 00:34:41Tom.Felkersetmessageid: <1300667681.04.0.269037633009.issue11620@psf.upfronthosting.co.za>
2011-03-21 00:34:40Tom.Felkerlinkissue11620 messages
2011-03-21 00:34:40Tom.Felkercreate