There are several possible causes for al_load_sample to fail.
1. You didn't initialize allegro, the audio or the acodec addons.
See al_init() , al_install_audio() , al_init_acodec_addon() for details.
2. You didn't build support for your particular sound file type into allegro.
Where did you get allegro from? Did you build it yourself?
3. Your path or your current working directory is wrong.
Try testing loading the file with an absolute path. If a relative path fails, your working directory is not what you expect it to be. See al_change_directory() , al_get_standard_path() , al_path_cstr() for details.
4. Your sound file is a type not recognized by Allegro. Try saving it in a different format, or re-saving it with an audio editor.