Why would al_install_audio() suddenly stop working?
DreamCloud

I've been working on my project now for a while and I've never had problems with it, but today it just stop working.
It wouldn't have anything to do with my code since I've only been working on everything that happens after the initializations.

In the debug it says it can't find "audio.c", so just in case, I made a new project and reinstalled Allegro.
Even that one has the same problem.

#SelectExpand
1if (!al_init()){ fprintf(stderr, "failed to initialize allegro!\n"); return -1; } 2 3 4 ALLEGRO_DISPLAY *display = NULL; 5 ALLEGRO_EVENT_QUEUE *event_queue = NULL; 6 ALLEGRO_TIMER *timer = NULL; 7 8 int S_MODE; 9 int S_WIDTH = GetPrivateProfileInt("Graphics", "screen_width", 1366, "bin/prefs.ini"), 10 S_HEIGHT = GetPrivateProfileInt("Graphics", "screen_height", 768, "bin/prefs.ini"); 11 if (S_MODE = GetPrivateProfileInt("Graphics", "fullscreen", 0, "bin/prefs.ini")) 12 { 13 al_set_new_display_flags(ALLEGRO_FULLSCREEN | ALLEGRO_OPENGL); 14 } 15 else al_set_new_display_flags(ALLEGRO_WINDOWED | ALLEGRO_OPENGL); 16 display = al_create_display(S_WIDTH, S_HEIGHT); 17 if (!display){ fprintf(stderr, "failed to create display!\n"); return -2; } 18 19 al_init_image_addon(); 20 al_init_font_addon(); 21 al_init_ttf_addon(); 22 al_init_primitives_addon(); 23 al_install_audio(); 24 al_init_acodec_addon(); 25 al_reserve_samples(10);

Edgar Reynaldo

What version of Allegro are you using? And where did you get it from?

It could be due to conflicting dll/library version problems. Or linking to different versions of the same library.

DreamCloud

I used NuGet to get it in visual studio, which is 5.2.

Edgar Reynaldo

Well, I can't explain your problem, but the reason it can't find audio.c is because it is looking for it in the compilation path, not in your file system. Since you didn't compile it yourself it can't find it.

Thread #616325. Printed from Allegro.cc