Hello Pygame developers: Please read entire message before assuming
you've
heard this before:)
I am a new user of Pygame. I have the book "Beginning Game Dev with
Python
and Pygame". So far I am very impressed with Pygame; It has excellent
graphics response and input capabilities. The sound Mixer library has
problems though.
When I tried the examples in Chapter 10 "Making Things Go Boom", I
noticed
a "Crackling" noise when playing sound effects (short wav files) and
music
(long Ogg files).
I have searched the archives at Seul.org and searched on Google for
fixes
to this problem. The solutions suggested basically amount to changing
arguments passed into: pygame.mixer.pre_init(...)
I tried many different settings:
pygame.mixer.pre_init(44100, -16, 2, 4096)
pygame.mixer.pre_init(22050, -16, 2, 4096)
pygame.mixer.pre_init(22050, 16, 2, 1024 * some_number)
Too many to keep listing.
I also tried leaving the settings at default, which actually produces the
least amount to crackling.
I played the music/sound files with Windows Media Player to rule out my
system or bad files. There was no crackling there.
On some of the Google searches, I saw that people were pointing to the
problem being in the actual SDL_Mixer.
So I downloaded SDL/SDL_Mixer extension and re-wrote the example scripts
in
SDL/C++, using the same music/sound files.
To my surprise, there was NO Crackling noise.
So, the problem is NOT my system, it's not the arguments I'm passing
into
pygame.mixer, and it's not SDL_Mixer.
The problem has to be somewhere in the Pygame Sound/Music libraries.
I even tried swapping out the SDL_Mixer libs that came with Pygame for
the
ones that came with SDL_Mixer, and still got the crackling in Pygame.
It would be nice if this could be fixed. Because the crackling is
essentially making the library unuseable. Which would be a shame,
because
Pygame is a terrific library/tool.
Thanks,
Ethan D.
Systems Programmer, SR.
Planetary Lab, Univ Arizona
My System:
Windows Vista 32bit home premium
IP35-Pro mobo, integrated sound, latest drivers
4 Gig RAM
Intel Quad core