Comment 3 for bug 290691

Revision history for this message
marmuta (marmuta) wrote :

Hi, thanks for answering so quickly :)

When I run it with alsa the cpu usage just shifts to mnemosyne (on a Intrepid RC live cd):

ubuntu@ubuntu:~$ pulseaudio -k
W: ltdl-bind-now.c: Failed to find original dlopen loader.
ubuntu@ubuntu:~$ SDL_AUDIODRIVER=alsa mnemosyne&
[1] 8945
ubuntu@ubuntu:~$ top -bn3 |grep pulseaudio
ubuntu@ubuntu:~$ top -bn3 |grep mnemosyne
 8945 ubuntu 20 0 55220 20m 13m S 7.9 1.0 0:03.62 mnemosyne
 8945 ubuntu 20 0 55220 20m 13m S 6.0 1.0 0:03.80 mnemosyne
 8945 ubuntu 20 0 55220 20m 13m S 6.0 1.0 0:03.98 mnemosyne
ubuntu@ubuntu:~$

Looking at the sources, pygame.mixer.init always opens an SDL mixer stream. I think this is by design, rather than a bug, since games have something to play most of the time. Whereas Mnemosyne sits mostly idle (ok, does so for me ;), only occasionally playing a single sound.

I'm wondering if it could open the mixer just when needed and then shut it down again after playback is done? Or maybe late init the mixer on first playback and close it a minute after the last one?