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

Re: [pygame] [newbie] Sound within pygame



On Thu, 19 Aug 2004 07:44:41 -0700
Pete Shinners <pete@shinners.org> wrote:

> 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?

Pete, 

that pygame.mixer.init() seemed to do it, both on windows
and linux. Many thanks.

adam

-- 
=============================
site: http://www.monkeez.org
wiki: http://wiki.monkeez.org
=============================