#28 Crash if no audio device is available

v1.0 (example)
open
nobody
sound (1)
5
2014-02-09
2014-02-09
Lars Krueger
No

System:
Gentoo Linux 64 bit
No pulseaudio (or any other sound manager)

Observed behavior:
The following error appears during start, when another application currently holds the sound device.

ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Traceback (most recent call last):
File "/usr/share/games/pysolfc/pysol.py-python2.7", line 32, in <module>
sys.exit(main(sys.argv))
File "/usr/lib64/python2.7/site-packages/pysollib/main.py", line 359, in main
r = pysol_init(app, args)
File "/usr/lib64/python2.7/site-packages/pysollib/main.py", line 314, in pysol_init
app.audio.connectServer(app)
File "/usr/lib64/python2.7/site-packages/pysollib/pysolaudio.py", line 445, in connectServer
self.mixer.init()
pygame.error: No available audio device

Expected behaviour:
Just go on without sound.

Discussion

  • Lars Krueger
    Lars Krueger
    2014-02-09

    Applies to v2.0. Sorry, didn't see the milestone field.