Comment 4 for bug 290691

Revision history for this message
Peter Bienstman (peter-bienstman) wrote : Re: [Bug 290691] Re: mnemosyne causes cpu usage in pulseaudio

But still, opening a mixer stream which is idle should not take all the CPU
time, so I'm inclined to think this is pygame regression, as with previous
pygame versions it worked fine.

I agree that it would be in principle possible to work around this in
Mnemosyne, but the upcoming 2.x codebase no longer uses pygame but phonon, so
I'm not really inclined to put a lot of effort in something that will become
obsolete anyhow...

Peter

On Thursday 30 October 2008 09:21:08 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?

--
------------------------------------------------
Peter Bienstman
Ghent University, Dept. of Information Technology
Sint-Pietersnieuwstraat 41, B-9000 Gent, Belgium
tel: +32 9 264 34 46, fax: +32 9 264 35 93
WWW: http://photonics.intec.UGent.be
email: <email address hidden>
------------------------------------------------