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

Re: [pygame] Pygame playing music too quickly?



Hey,

richard and I talked on irc, and this fixed it:
Call this before calling pygame.init() or pygame.mixer.init()

pygame.mixer.pre_init(44100,-16,2, 1024 * 3)

This also fixes sound on some winxp machines.  However it does
increase the latency a little, because the buffer is larger.  So
sounds take a fraction longer to start playing.
  

On 9/2/05, Rene Dudfield <renesd@xxxxxxxxx> wrote:
> Hey,
> 
> could you please try this before running pygame?
> export SDL_AUDIODRIVER="alsa"
> 
> Another thing to try if that doesn't work is setting the rate to 48000
> and see what happens.
> 
> 
> Cheer.
> 
> On 9/2/05, Richard Jones <richardjones@xxxxxxxxxxxxxxxx> wrote:
> > On Fri, 2 Sep 2005 11:10 am, Rene Dudfield wrote:
> > > what OS/version are you using?
> >
> > Ubuntu 5.04
> >
> >
> > > Can you please try the latestest version of pygame to see if it
> > > happens with that too?
> >
> > I'm using the Ubuntu-packaged pygame. I just compiled the lates pygame and it
> > didn't help.
> >
> > SDL mixer version 1.2.5-9
> >
> >
> > > What sound card/drivers do you have?
> >
> > VIA 8235 on the motherboard.
> >
> >
> > > Could you please try some other SDL programs to see if they have the
> > > same behaviour.
> >
> > Any suggestions? I'm not sure what to try. playsound appears to work.
> >
> >
> > > What frame rate is your game getting?
> >
> > Was unlimited (well, set to 6000) but limited to 50 changes nothing.
> >
> >
> > > Does it skip when just playing music, and doing nothing else?
> >
> > Yes.
> >
> >
> >      Richard
> >
> >
> >
>