Hi, in my pc when i start my allegro program it crash with segmentation fault when i call the allegro function "al_reserve_function(1);". In other pc it doesn't happen then i have read the code of this function and it crash when try it "if(_al_kcm_driver->allocate_voice(voice) != 0)" then the problem can be caused by the audio driver. How i can check this?
I have Ubuntu 14.04 and i use codeblocks.
Thanks.
Do you call al_install_audio properly and check it's return value before calling al_reserve_samples? If al_install_audio returns false for some reason, you can't use any audio functions.
yes, the problem is in al_install_audio, i tryed to install libpulse-dev but don't work... and thanks for the answer
Do you compile Allegro yourself? You could paste a copy of the make output here, perhaps that will bring more clarity...
I use codeblocks, in the build log there aren't problems, what i can do to post more informations?
I assume audio otherwise works correctly on that computer? Could you try the audio-related Allegro examples and see if they work or not? If not, it may be an Allegro bug.
Try setting the default mixer BEFORE reserving samples, something like:
al_set_default_mixer(mixer);
The problem is the al_install_audio(), it return always false also in a simple project.
Declaring first the mixer the problem persist.
Ahh ok sorry - have you installed these?
libogg-dev
libvorbis-dev
DUMB
Do you compile Allegro yourself?
This is the important question to be answered. Ubuntu is basically the best supported platform for Allegro, so it all should just work assuming Allegro was built/installed properly.
EDIT: I should also say, that for starting, I'd recommend using our PPA: https://wiki.allegro.cc/index.php?title=Install_Allegro_from_Ubuntu_PPAs
nothing, the problem persist...
I try to format and install ubuntu 15.04.
Well, fwiw I use Ubuntu 14.04 and I have no problems .
Problem solved! I have installed the 15.04 version.;D
Most likely is was a driver problem then? Too bad we couldn't figure it out. But anyway, good to hear it works for you now.