Posted August 02, 2020
Greetings everyone.
After coming face to face with a really annoying and unexpected problem and figuring out what was wrong, someone mentioned that I should post this little tutorial here. So, here I am, and here's the lesson I learned from all of my searching...
So, at some point, my best guess is that Windows 10 got an update that messed with a particular setting that resulted in every DOSBox game not having sound effects anymore. Sound Blaster and GUS emulation was just gone, but General MIDI music was running fine. The Immortal and Ultimate Doom were the games that showed me I had no Sound Blaster support for them, and DOSBox was telling me "MIXER: Can't open audio: No available audio device, running in nosound mode" when it started up. So what was the problem?
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
That registry key was the problem. I had to change the SDL_AUDIODRIVER key there from "directsound" to "dsound" because at some point, an update reset the value. And once I made that change, I had sound effects in DOSBox again. The Immortal's music played, the selection sounds in Ultimate Doom played, and all was right in the world.
How you do this is simple, and I'll give you two means to get to where you need to go...
Option #1
- Right click on the Start button and select the "Run" option.
- When that comes up, type in "regedit" without the quotes.
- From there, follow the path above until you reach the needed address (select "HKEY_LOCAL_MACHINE," then "SYSTEM," then "CurrentControlSet," then "Control", then "Session Manager," and finally "Environment").
- At that address in your computer's registry, double click on "SDL_AUDIODRIVER" file in the bigger window on the right and change the "Value data" line to read "dsound" (without the quotes).
- Click "OK" and close the registry editor window.
- Just to be safe, restart your PC to make sure the change has taken effect. If all goes well, things should be back to normal in DOSBox.
Option #2
- While on your computer's desktop, you should see a small, yellow folder along the bottom of your screen. Left-click on that folder with your mouse, and a new window should open up with a host of info (a "Folders" section, a "Devices and Drives" section, etc.). On the left in this new window, you'll see things like "This PC", "Downloads", "Desktop", etc. Right-click on "This PC" and choose "Properties".
- On the right side of the new window that comes up, choose "Advanced System Settings".
- Another new window will come up. In that one, choose "Environment Variables".
- Yet another new window will come up. In that window, scroll down a bit in the "System Variables" window and click the "SDL_AUDIODRIVER" line. Now hit the "Edit" button under that same window.
- On the "Variable value" line, change it to read "dsound" (without the quotes).
- Hit "OK" to close all of the windows and then restart your PC.
I have no idea why that key was changed or when, but it clearly was since everything was working a few months ago. So hopefully this post will help anyone else who's not as savvy with this kind of thing, and keep them from finding what I did on my search (95% of the time, post after post mentioned the SDL_AUDIODRIVER, but no one gave the most important bit... what the hell it was and where the hell it was). So now, anyone in the same spot I was will know.
Hope this helps :)
Additional info- If you find that there is no SDL_AUDIODRIVER to select, it's easy to create.
If you used Option #1- In the large window on the right (where you see a number of files that have a red "ab" on them), right-click on your mouse and select "New String Value". You'll get a file called "New Value #1". Right-click on that new file and select "Rename". Now you can rename the file to "SDL_AUDIODRIVER" (without the quotes) and from there, right-click on the renamed file and select "Modify". From there, put "dsound" (without the quotes) in the "Value data" line. After that, hit "OK" to close all of the windows and restart your PC.
If you used Option #2- Click the "New" button that's under "System variables". In the "Variable name" line, put "SDL_AUDIODRIVER" (without the quotes), and in the "Variable value" line, put "dsound" (without the quotes). Click "OK" to close out all of the windows, restart your PC.
I can't promise that this will fix it for you, but if things were working fine for you in Windows 10 with DOSBox games, and then they suddenly had no sound effects (especially if DOSBox is telling you that "Mixer" can't find an audio device), this is an option that could very well fix the problem for you.
Hope this helps at least one person :)
After coming face to face with a really annoying and unexpected problem and figuring out what was wrong, someone mentioned that I should post this little tutorial here. So, here I am, and here's the lesson I learned from all of my searching...
So, at some point, my best guess is that Windows 10 got an update that messed with a particular setting that resulted in every DOSBox game not having sound effects anymore. Sound Blaster and GUS emulation was just gone, but General MIDI music was running fine. The Immortal and Ultimate Doom were the games that showed me I had no Sound Blaster support for them, and DOSBox was telling me "MIXER: Can't open audio: No available audio device, running in nosound mode" when it started up. So what was the problem?
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
That registry key was the problem. I had to change the SDL_AUDIODRIVER key there from "directsound" to "dsound" because at some point, an update reset the value. And once I made that change, I had sound effects in DOSBox again. The Immortal's music played, the selection sounds in Ultimate Doom played, and all was right in the world.
How you do this is simple, and I'll give you two means to get to where you need to go...
Option #1
- Right click on the Start button and select the "Run" option.
- When that comes up, type in "regedit" without the quotes.
- From there, follow the path above until you reach the needed address (select "HKEY_LOCAL_MACHINE," then "SYSTEM," then "CurrentControlSet," then "Control", then "Session Manager," and finally "Environment").
- At that address in your computer's registry, double click on "SDL_AUDIODRIVER" file in the bigger window on the right and change the "Value data" line to read "dsound" (without the quotes).
- Click "OK" and close the registry editor window.
- Just to be safe, restart your PC to make sure the change has taken effect. If all goes well, things should be back to normal in DOSBox.
Option #2
- While on your computer's desktop, you should see a small, yellow folder along the bottom of your screen. Left-click on that folder with your mouse, and a new window should open up with a host of info (a "Folders" section, a "Devices and Drives" section, etc.). On the left in this new window, you'll see things like "This PC", "Downloads", "Desktop", etc. Right-click on "This PC" and choose "Properties".
- On the right side of the new window that comes up, choose "Advanced System Settings".
- Another new window will come up. In that one, choose "Environment Variables".
- Yet another new window will come up. In that window, scroll down a bit in the "System Variables" window and click the "SDL_AUDIODRIVER" line. Now hit the "Edit" button under that same window.
- On the "Variable value" line, change it to read "dsound" (without the quotes).
- Hit "OK" to close all of the windows and then restart your PC.
I have no idea why that key was changed or when, but it clearly was since everything was working a few months ago. So hopefully this post will help anyone else who's not as savvy with this kind of thing, and keep them from finding what I did on my search (95% of the time, post after post mentioned the SDL_AUDIODRIVER, but no one gave the most important bit... what the hell it was and where the hell it was). So now, anyone in the same spot I was will know.
Hope this helps :)
Additional info- If you find that there is no SDL_AUDIODRIVER to select, it's easy to create.
If you used Option #1- In the large window on the right (where you see a number of files that have a red "ab" on them), right-click on your mouse and select "New String Value". You'll get a file called "New Value #1". Right-click on that new file and select "Rename". Now you can rename the file to "SDL_AUDIODRIVER" (without the quotes) and from there, right-click on the renamed file and select "Modify". From there, put "dsound" (without the quotes) in the "Value data" line. After that, hit "OK" to close all of the windows and restart your PC.
If you used Option #2- Click the "New" button that's under "System variables". In the "Variable name" line, put "SDL_AUDIODRIVER" (without the quotes), and in the "Variable value" line, put "dsound" (without the quotes). Click "OK" to close out all of the windows, restart your PC.
I can't promise that this will fix it for you, but if things were working fine for you in Windows 10 with DOSBox games, and then they suddenly had no sound effects (especially if DOSBox is telling you that "Mixer" can't find an audio device), this is an option that could very well fix the problem for you.
Hope this helps at least one person :)
Post edited June 02, 2021 by TheCoop