[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Saving Sound Files?



On Thu, 2006-01-05 at 06:17 +0000, kschnee@xxxxxxxxxx wrote:
> Is there a way to save the sound files pygame.mixer makes? That is, if I
> load two sounds, modify them, and combine them into a Numeric array and/or
> a Sound object, can I then get that modified data back out as a file?

There's no supported way to do this. I thought that there was some code
to create a dummy .wav file in pygame but I couldn't find it just now.

To be honest, it isn't that hard to write out a raw .wav file of your
own. A raw wav is a small header and just a dump of the sample data.
With Numeric and the python struct module it shouldn't be too bad.