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

Re: [pygame] sound crackling and fmod



Hi all,

Regarding my crackling sound problem with Pygame, John wrote:

>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,

First things first: I tried your first suggestion: export SDL_AUDIODRIVER=dsp
and then I ran the Shadow of the Beast demo. It worked perfectly. I haven't even bothered with the other options you mentioned, as the first did the trick. Thanks heaps. I also tested another demo, that had also crackled, and that works fine too now, with the same "export" line. All I do now is write a simple script that does the export and then runs Python on the demo. Simple. Thanks again John, and thanks also to takis and others for your help too.

Hopefully this info will help other Python developers who may have similar problems with Linux and Pygame.

I'm still keen to get PySonic (that uses Fmod) to work with Linux. Fmod is excellent; I've used it before to make a c++ game with DirectX and I recommend it to everyone. The only problem is that I can't compile a Linux version. Despite that, I can now get Ogg and wave files playing properly, so one thing at a time. But if anyone does know how to get PySonic to work with Linux, please tell me.

Thanks again everyone.

Cheers,

Andrew.

Send instant messages to your online friends http://au.messenger.yahoo.com