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

Re: [pygame] garbled sound in pygame-1.8 on xp-pro sp2 on a dell laptop



On Sat, 5 Apr 2008 13:14:27 -0700 (PDT)
Phil Hassey <philhassey@xxxxxxxxx> wrote:

> os.environ['SDL_AUDIODRIVER'] = 'waveout'
> That mostly fixes it for me.  Now it seems that the second time it
> plays through the music there is some added clicking artifacts, but
> the first time it plays fine ...  

This was a problem with 1.7.1 on Linux with Ogg Vorbis audio files as
well. The solution for me was to add a check to see if the music was
still playing, and if not restart it, rather than using PyGame's
looping. Here's an example:

def loop_music():
	if not pygame.mixer.music.get_busy():
		pygame.mixer.music.play()