Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Freeze when al_install_audio() on Linux

This thread is locked; no one can reply to it. rss feed Print
Freeze when al_install_audio() on Linux
meh meh
Member #13,900
January 2012

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
Member #7,859
October 2006
avatar

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
Member #13,900
January 2012

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
Second in Command
February 2005
avatar

Do you have the examples, and do they work?

They all watch too much MSNBC... they get ideas.

meh meh
Member #13,900
January 2012

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
Member #23
April 2000

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

Arthur Kalliokoski
Second in Command
February 2005
avatar

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

They all watch too much MSNBC... they get ideas.

Elias
Member #358
May 2000

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 :)

--
"Either help out or stop whining" - Evert

Go to: