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

Re: [pygame] How do you do the sound?



On Thu, Dec 10, 2009 at 09:21:16PM +0000, Kris Schnee wrote:
> On Thu, 10 Dec 2009 21:36:10 +0100, inigo delgado <inigo.delgado@xxxxxxxxx>
> wrote:
> > Hi all:
> > 
> > And sorry but my not to good english
> > 
> > I'm pretty new in pygame, and in my freetime i'm doing a shooter based en
> > star wars -sssssh!!! don't tell it to George, he don't know nothing-.
> > 
> > Well, that's my problem. I'd and pretty xwing firing lasers and frying
> > ties,
> > so I decided to do the sound with pygame.mixer and...
> > 
> > #~@|!#¬[ !!!!! It's and incredible lag between the 'key is pressed' and
> > 'the
> > sound is played' (about one second)!!!!
> > 
> > I have a Ubuntu 9.10, so I googled and saw that the problem should be
> (and
> > is) in SDL's interaction with pulseaudio (or in pulseaudio itself... i
> > don't
> > know). Well, I solved it unistalling pulseaudio and installing esound...
> > but
> > I think thats not the best solution... How do you do ubuntu
> compatibility?
> > 
> > I've ear about pyaudio but I don't know... I'll prefer to ear your
> > experiences before learning a new API....
> > 
> > How do you do the sound?
> 
> It might help to give more detail about what you're doing, and how.
> 
> But you might want to look at where in your program's main loop you're
> playing the sound. For instance, is the sound getting called only after
> some complex processing of other game events? That would delay the sound.

It is also a good idea to open up your sound files in audacity and check 
to see if they have any silence at the beginning of the file. If so, you 
can delete it easily.

---
James