[Donion] [2.0.11] Long black screen wait before loading screen when no audio device available

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Usul
Fast Inserter
Fast Inserter
Posts: 182
Joined: Mon Oct 31, 2016 5:05 pm
Contact:

[Donion] [2.0.11] Long black screen wait before loading screen when no audio device available

Post by Usul »

When launching the game with no audio device available, there is a long (ca. 40 seconds) unresponsive wait with a black screen, before the loading/logo screen appears.

Upon reaching the main menu, the usual and familiar message "could not initialize audio" appears.

In 1.1, when no audio devices are available, the game launches near-instantly to the loading/logo screen regardless, and then shows that message in the main menu. There is no long wait with black screen!

Please fix this.

I am often required to play the game without sound (USB Loudspeakers switched off, USB Headphone Amp switched off, Windows 11 showing "no audio device installed" in taskbar).
Last edited by Usul on Sun Nov 03, 2024 9:25 pm, edited 1 time in total.

robot256
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [2.0.11] Long black screen wait before loading screen when no audio device available

Post by robot256 »

I saw this as well and reported it during the beta. The logfile shows a series of five "Failed to open audio device X. Retrying with default audio device". Which makes no sense because it was the default device that failed the last four times too.

AstralPhoenix
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Oct 27, 2024 3:00 am
Contact:

Re: [2.0.11] Long black screen wait before loading screen when no audio device available

Post by AstralPhoenix »

I'd like to note that I alt-tabbed to change audio device in bottom right with windows 10 and crashed my factorio. Possibly unrelated, but worth mentioning, imo.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13956
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.11] Long black screen wait before loading screen when no audio device available

Post by Rseding91 »

Looking at the logic - the issue is coming from SDL's audio system specifically I found this part:

Code: Select all

const Uint64 timeout = SDL_GetTicks64() + 8000;  /* intel's audio drivers can fail for up to EIGHT SECONDS after a device is connected or we wake from sleep. */
    
Which suggests to me that it's working as intended however the intent is that - you have an audio device installed - and if you don't, you get to wait for this crazy timeout. I don't have a nice answer for that. You could always pass --disable-audio which will skip all of this logic and just start with audio disabled.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Usul
Fast Inserter
Fast Inserter
Posts: 182
Joined: Mon Oct 31, 2016 5:05 pm
Contact:

Re: [2.0.11] Long black screen wait before loading screen when no audio device available

Post by Usul »

Rseding91 wrote:
Sun Nov 03, 2024 12:52 pm
Looking at the logic - the issue is coming from SDL's audio system specifically I found this part:

Code: Select all

const Uint64 timeout = SDL_GetTicks64() + 8000;  /* intel's audio drivers can fail for up to EIGHT SECONDS after a device is connected or we wake from sleep. */
    
Which suggests to me that it's working as intended however the intent is that - you have an audio device installed - and if you don't, you get to wait for this crazy timeout. I don't have a nice answer for that. You could always pass --disable-audio which will skip all of this logic and just start with audio disabled.
Thanks but nah, I will not use a start parameter to bypass a 40 second wait, that simply was non-existant before 2.0. To accept this as intended behaviour and a workaround instead of a fix is sadly a step backwards.

Donion
Factorio Staff
Factorio Staff
Posts: 265
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [Donion] [2.0.11] Long black screen wait before loading screen when no audio device available

Post by Donion »

Thanks for the report, the issue is fixed for the next release, 2.0.15.
When there is no audio device found, the game will no longer try to initialize one anyway.

Post Reply

Return to “Resolved Problems and Bugs”