PulseAudio if not then OpenAL

Archives Forums/Linux Discussion/PulseAudio if not then OpenAL

Armitage 1982(Posted 2012) [#1]
I'm using the Skidracer Pulse Audio Driver
http://blitzmax.com/Community/posts.php?topic=93662

But someone report to me an :
Assertion 's' failed at pulse/simple.c:255, function pa_simple_free(). Aborting.

Simply because he don't have the PulseAudio Driver installed.
A simple apt-get install pulseaudio would fix this but of course some Linux users refuse to do that :(
(I'm starting to understand why there is so little games on Linux...).

Do you know an efficient way to try the PulseAudio first (without the crash) then drawback to OpenAL if the host don't have it ?

I'm NOT using OpenAL by default because this driver does not work correctly with my game.
First I get this in the output console when I'm using it :
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib audio/pcm_bluetooth.c:1613:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
ALSA lib audio/pcm_bluetooth.c:1613:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
ALSA lib audio/pcm_bluetooth.c:1613:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
ALSA lib audio/pcm_bluetooth.c:1613:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started


Then sound is working until I load a few ogg musics, after 2 or 3 songs it simply stop playback.

Thanks a lot !


Armitage 1982(Posted 2012) [#2]
About OpenAL
Everything is explained here in details : http://blitzmax.com/Community/posts.php?topic=96082

But there is no real fix for that...

I spot a few games using PulseAudio under Linux and all the BlitzMax one crash for the same reasons.
No idea why the function doesn't return -1 or 0.

I cannot even put a try catch in there (assertion disabled) if at least I could warn my user with a decent error asking to install PulseAudio...

Last edited 2012