|
Audio fals to install sometimes |
kovarex
Member #14,203
April 2012
|
Hello, What can be the reason of this? Is there some workaround? www.factorio.com - a factory building game. |
André Silva
Member #11,991
May 2010
|
Mightn't be a problem with the libraries, at least I never heard about this. What version of Allegro are you using? Have you tried other versions? What about compiling using the individual libraries or the monolith one? And what about compiling with the mt and md ones, and debug vs release?
|
kovarex
Member #14,203
April 2012
|
Hello, thank you for your response, we use allegro 5.1.5, we compile it our own way (statically). This is our allegro init function, I don't think that something rare is there: 1 if (global->graphicsSettings->getFullScreen())
2 al_set_new_display_flags(ALLEGRO_FULLSCREEN_WINDOW);
3 else
4 al_set_new_display_flags(ALLEGRO_RESIZABLE);
5 al_set_new_display_option(ALLEGRO_VSYNC, 1, ALLEGRO_SUGGEST);
6 if (global->graphicsSettings->getMultisamplingLevel() != 0)
7 {
8 al_set_new_bitmap_flags(ALLEGRO_MIN_LINEAR | ALLEGRO_MAG_LINEAR | ALLEGRO_VIDEO_BITMAP);
9 al_set_new_display_option(ALLEGRO_SAMPLE_BUFFERS, 1, ALLEGRO_SUGGEST);
10 al_set_new_display_option(ALLEGRO_SAMPLES, global->graphicsSettings->getMultisamplingLevel(), ALLEGRO_SUGGEST);
11 }
12 else
13 {
14 al_set_new_bitmap_flags(ALLEGRO_VIDEO_BITMAP);
15 al_set_new_display_option(ALLEGRO_SAMPLE_BUFFERS, 0, ALLEGRO_SUGGEST);
16 al_set_new_display_option(ALLEGRO_SAMPLES, 0, ALLEGRO_SUGGEST);
17 }
18
19 this->display = al_create_display(width, height);
20
21 if (!this->display)
22 throw std::runtime_error("failed to create display!");
23 if (!al_init_image_addon())
24 throw std::runtime_error("Failed to initialize al_init_image_addon!");
25
26 boost::filesystem::path windowIconPath = global->paths->graphics / "factorio-icon.png";
27 this->windowIcon = al_load_bitmap(windowIconPath.string().c_str());
28 if (!this->windowIcon)
29 throw std::runtime_error(ssprintf("Failed to load window icon! Loading from: %s", windowIconPath.string().c_str()));
30 al_set_display_icon(this->display, this->windowIcon);
31
32 if (!al_install_keyboard())
33 throw std::runtime_error("failed to initialize the keyboard!");
34 if (!al_install_mouse())
35 throw std::runtime_error("failed to initialize the mouse!");
36 al_init_font_addon();
37 if (!al_init_ttf_addon())
38 throw std::runtime_error("failed to initialize the ttf addon!");
39 if (!al_init_primitives_addon())
40 throw std::runtime_error("failed to load primitives addon!");
41 if (!al_install_audio())
42 throw std::runtime_error("Failed to install audio!");
43 if (!al_init_acodec_addon())
44 throw std::runtime_error("Failed to initialize audio codecs!");
45 if (!al_reserve_samples(50))
46 throw std::runtime_error("Failed to reserve samples!");
47 this->loadAllegroFonts();
www.factorio.com - a factory building game. |
André Silva
Member #11,991
May 2010
|
Nope, doesn't look like the code has anything wrong with it.
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
Your best bet is to dig inside al_install_audio and set a breakpoint in there somewhere or follow it through the call. Keep running it until it fails to install again. Yeah, try setting a breakpoint in do_install_audio in addons/audio/audio.c lines 173-330. Find out which driver it is using, and I think you can specify the audio driver used in the allegro.cfg file too, so it might not hurt to try some different ones and see if they work. 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 |
|