Failed to Create DirectSound Device

Reporter: time-killer-games  |  Status: open  |  Last Modified: June 24, 2020, 07:46:28 PM

The title of this issue quotes an error message DirectSound shows on startup of a game before crashing directly after if the user doesn't have any speakers plugged in.
time-killer-games  
also happens when there are speakers plugged in but they aren't being recognized for whatever reason, if I had to guess.
RobertBColton  

I think I knew about this problem or read about it before, it just never happened until now. What does GM8 do in this case? I am not interested in what GMS does since it uses OpenAL if new audio system is checked.

// Initialize the direct sound interface pointer for the default sound device.

time-killer-games  

GM 8.1 runs the game regardless, same with GMStudio 1.4 and 2.x. No error.
time-killer-games  

This same thing happens with OpenAL. It errors a similar error. But there is one difference, it doesn't crash after the error in OpenAL, at least...
RobertBColton  

Actually, I discovered GM8.1 displays the following error message which can not be dismissed.
GM8.1 Audio Device Error Message

time-killer-games  

lol yoyogames seriously put wtf in the title bar
RobertBColton  

Yeah so this is definitely documented and surprisingly I can now reproduce it using OpenAL too.
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ee416365(v%3dvs.85)

You should prepare your applications for this call to fail so that they can either continue without sound or prompt the user to close the application that is already using the sound device.

I am reproducing it by disabling all my sound devices in Device Manager. What I discovered that GM8.1 does is basically retries to create the device, and it will play the game if I enable it in Device Manager after the error message. I am going to bring this looping behavior over to ENIGMA since we already have "Retry" and "ignore" on the debug dialog.

And also interestingly enough once an application/process takes over the sound device, it becomes impossible to disable it in Device Manager until the application is closed.

RobertBColton  

Hrm, retrying doesn't seem to work with OpenAL because of OpenAL32.dll or something.
http://openal.org/pipermail/openal/2016-September/000550.html
RobertBColton  

Alright, finally got the chance to test GMSv1.4 and here's what happens, it's an almost silent fail. This is something ENIGMA can do with a simple dummy interface or else hot loading.

No audio output devices found.  Will fallback to use dummy output.
Could not initialize audio output device.  Falling back to use dummy output.

Please sign in to post comments, or you can view this issue on GitHub.