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

[pygame] Sound initialization problems



When I try to play WAV file with sound subsystem initialized using
default values, the sound seems to be corrupted (plays "faster", come
"cracks" can be heard during playback of longer clips), at least
comparing to the output of /usr/bin/play. I think the file frequency,
datasize and stereo doesn't match default settings, so I should set
initialization parameters with pygame.mixer.pre_init(), but... How do I
get sound parameters from WAV file?

I tried to set parameters according to the output of file command
(gun05.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16
bit, mono 44100 Hz), but setting frequency to 44100 resulted in much
more speed-up.

-- 
Jarek Zgoda
http://jpa.berlios.de/