|
Why would al_install_audio() suddenly stop working? |
DreamCloud
Member #16,140
January 2016
|
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. In the debug it says it can't find "audio.c", so just in case, I made a new project and reinstalled Allegro. 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
Major Reynaldo
May 2007
|
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. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
DreamCloud
Member #16,140
January 2016
|
I used NuGet to get it in visual studio, which is 5.2.
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
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. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|