Freeze when al_install_audio() on Linux
meh meh

Hello guys,

I still work on my C++ layer upon Allegro 5 called Meh2D (I've started yesterday to share it on github : https://github.com/remeh/meh2d , nothing is ready but I share the link anyway...)

But I currently have one big problem with Allegro 5 on Linux, my init process freezes when I call al_install_audio(), without any information. What can I do in order to know what is happening ?

I'm using the Allegro 5 provided in my Linux distribution (ArchLinux) in its version 5.0.6.

Thanks in advance :),
remeh

weapon_S

Install debug version of Allegro. Then link your program with that version. Look at the log and/or post it here. Also, when linked withe debug version, you could run your program under gdb. (You should compile and link your program with a debug option like -gstabs+ or -g.)

meh meh

Hey !

Thank you for the advice weapon_S, unfortunately, the allegro.log doesn't contains anything about the audio init.

In order I call :
al_init(), al_init_image_addon(), al_install_keyboard(), al_install_mouse(), al_install_audio(), al_init_acodec_addon(), al_reserve_samples(int).

But in the allegro.log files, the last lines are about the keyboard init (even if the mouse init seems to be ok), but nothing about the audio system... Will try some tweaks in the .cfg.

remeh

Arthur Kalliokoski

Do you have the examples, and do they work?

meh meh

Okay, it seems that by default, allegro 5 is now trying to use pulseaudio, because when in the allegro5.cfg I set:

[audio]
driver=alsa

or

driver=openal

Everything works fine, but with driver=pulseaudio, it freezes. It must be on the pulseaudio side as I was thinking that pulseaudio wasn't even setup on my system. (something MUST have changed because before, it wasn't freezing, but I can't know which sound system allegro5 was using).

Well, I'll rely on OpenAL by setting it in the allegro5.cfg, that's good for me. Thanks guys.

Peter Wang

If you figure out why the pulseaudio driver is hanging, that would help.

Arthur Kalliokoski

I'd say a recommendation in the README to uninstall pulseaudio would be the best solution all around. :P

Elias

Except you can't do that under Ubuntu (without losing all the built-in audio stuff like working volume keys or per application volume control). Otherwise I do agree though :)

Thread #610415. Printed from Allegro.cc