[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Pygame playing music too quickly?
On Thursday 01 September 2005 09:18 pm, Richard Jones wrote:
> > This (which will wrap):
> >
> > python -c "import pygame;pygame.init();pygame.mixer.music.load('path to
> > music');pygame.mixer.music.play()"
> >
> > fails to play at the correct rate.
>
> Ogg files play a little more reliably, with only the occasional speedup.
I don't know if this is related, but as I just recently posted, I
see a similar behavior when playing sound files using:
s = pygame.mixer.Sound("sound_file.ogg")
s.play()
(jumps ahead / plays too fast).
But if I play some music in the background, it clears up -- even if
I play the music with 0 volume, e.g.:
pygame.mixer.music.load("bkg_sound_file.ogg")
pygame.mixer.music.set_volume(0.0)
pygame.mixer.music.play(loop=-1)
s = pygame.mixer.Sound("sound_file.ogg")
s.play()
(this plays fine).
This is a Debian 3.1 "Sarge" system with:
ii python2.3 2.3.5-3 An interactive high-level object-oriented la
ii python2.3-pyga 1.6-2 SDL bindings for games development in Python
(so, same version as you, I see).
I've been wondering why this happens.
Cheers,
Terry
--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com