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

[pygame] Pygame audio conflicts with Music Player Daemon



Hi all,

Just a note to you guys.

I ran your intro example, pulled right from your documentation.
http://www.pygame.org/docs/tut/intro/intro.html

Meanwhile, I play music with the Music Player Daemon (mpd). Specifically, I use a graphical interface for it called Sonata, which is written in python. However, I encountered the problem with a command-line interface (mpc) anyway, so that's irrelevant.

When I start the example program while mpd is playing music and attempt to close the program, the pygame window will not unload, and the program will deadlock on pygame.quit(). Once I stop the music, pygame.quit() will proceed and finish.

The program also gives me this error upon exit, but I believe this is entirely unrelated:
Traceback (most recent call last):
 File "test2.py", line 26, in <module>
   screen.fill(black)
pygame.error: display Surface quit

I proceeded to download the pygame source and run its tests, and encountered the same problem. Execution will freeze at the first test and will not proceed until I stop the music.

Of course, on the flip side, I cannot start music on mpd while the above pygame elements are running.

This doesn't happen with other audio applications, such as Rhythmbox, mplayer, or Exaile. Does anyone have any insight as to how pygame plays audio that might contribute to this?

System Information:
- Ubuntu 9.10
 -- PulseAudio 0.9.19
- Python 2.6.4
- Pygame 1.8.1release-1ubuntu1 (also fails tests in 1.9.1 source)
- mpd 0.15.4

Thanks,
- Fixen