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

Re: [pygame] [newbie] Sound within pygame



adam wrote:
I use OSS on my Debian box and other audio works. This should still work
with windows2k as well, where I have the volume setting up high?
Pygame defaults to using full volume. You can control the master volume with pygame.mixer.set_volume(). You can also adjust the volume per Sound or Channel, each has a set_volume().

Your initial example had the problem of the program quitting before the sound could really get started, but adding the delay will fix that.

I would recommend initializing ONLY the mixer module, and none of the others. Instead of pygame.init() call pygame.mixer.init(). If that still fails, do some tests with any other C programs that use SDL. What about other examples that run pygame?