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

Re: [pygame] calling mixer.init() results in high CPU usage



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On Vendredi 10 Octobre 2003 16:36, Andy Balcombe wrote:
> On my gentoo-linux 1.4 system (running python 2.2.3 and pygame 1.5.6)
> executing the following in a python shell results in python taking
> 100% CPU:
>
> balki@solo gdbox $ python
> Python 2.2.3 (#1, Aug 17 2003, 22:21:26)
> [GCC 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)] on linux2
> Type "help", "copyright", "credits" or "license" for more
> information.
>
> >>> import pygame
> >>> pygame.mixer.init()
>
> doing a pygame.mixer.quit() stops the high CPU usage.
>
> It does not do this on my windows system (win2000, python 2.2.2 and
> pygame 1.5.5)
>
> I've tried pygame-1.5.6 and 1.5.5 - both have the same result.
>
> Any ideas, anyone?
>
> Cheers,
>
> Andy

Hi,

it may be a linux sound driver problem. I have seen this problem with 
badly supported cards. One symptom is the KDE arts sound server exiting 
right after launch, complaining about too much CPU usage. If you're 
using arts try switching it off, it may solve your problem. 
I've also had problems with an OpenGL/pygame app. The main loop ran fine 
but my fullscreen display was black, while it was supposed to show a 
bunch of moving green polys... I tracked it down and it happened to be 
an ALSA setup problem, which I solved by going to alsa-project.org and 
using the setting they advised for my card.

Hope this helps,
sylvain

- -- 
Jean-Marc a ouvert le Grand Livre du Mal au hasard ; il a trouvé une pub 
pour un téléphone portable.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/hwmIK/qAVOpQGPYRAlMzAKC3V/GBj+TI+LU7NyUAG4TZXsoIWwCeNgXH
G03H7Ra9rgCl2knxG0aLxY0=
=l607
-----END PGP SIGNATURE-----