[Python pygame] Reading sound samples

view story

https://bbs.archlinux.org – Well, I've never worked with .wav files, so the following may be incorrect; you'll have to verify this on your own.As I read things, .wav files may be compressed but the python Wave module only supports uncompressed files, so you should test that your file is uncompressed.if 'NONE' != musicfile.getcomptype(): sys.exit()If 'getcomptype' instead returns something like 'PCM' I think you'll still be ok.  Since I've never done this, I really don't know what will be returned.It appears that you are assumming that your file has 2 channels (s (HowTos)