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

Re: [pygame] sound crackling and fmod



On Tue, May 01, 2007 at 12:02:48AM -0700, Andrew Pape wrote:
> Hi Takis,
> 
> >Do the following (this time AFTER the pygame.init()):
> 
> >pygame.mixer.quit()
> >pygame.mixer.init(44100,-16,1,4096)
> 
> >report back
> >Takis
> 
> 
> 
> Sorry, but that didn't solve the problem. I recall the sound was even
> worse (!) I suspect, as did another member of the mailing list, that
> it's a problem with my OS (Ubuntu Feisty Fawn) setup, rather than
> Pygame, perhaps something related to ALSA or OSS (whichever SDL is
> using for audio I don't know). Thanks for your help; if you have any
> other ideas, please tell me.
Hi,

you can force SDL to use ALSA or OSS by setting an environment variable,
see this page: http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fenvvars

You could try using the OSS emulation provided by ALSA:

$ export SDL_AUDIODRIVER=dsp
or:
$ export SDL_AUDIODRIVER=dma
then:
$ python program-name.py

or forcing ALSA:

$ export SDL_AUDIODRIVER=alsa

In my travels I've encountered stories of the ALSA OSS emulation working
"better" than the native ALSA drivers, I can't verify that though,

cheers,
John.