dsoal icon indicating copy to clipboard operation
dsoal copied to clipboard

Windows 11 Support

Open MarioTainaka opened this issue 2 years ago • 69 comments

Hello there, i'd like to report that neither DSOAL nor Creative Alchemy are working on Windows 11. Almost like dsound.dll isn't being loaded at all. I've already modified the registry with the following entries:

[HKEY_CURRENT_USER\Software\Classes\CLSID{47D4D946-62E8-11CF-93BC-444553540000}\InprocServer32] @="dsound.dll"

[HKEY_CURRENT_USER\Software\Classes\CLSID{3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}\InprocServer32] @="dsound.dll"

[HKEY_CURRENT_USER\Software\Classes\WOW6432Node\CLSID{47D4D946-62E8-11CF-93BC-444553540000}\InprocServer32] @="dsound.dll"

[HKEY_CURRENT_USER\Software\Classes\WOW6432Node\CLSID{3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}\InprocServer32] @="dsound.dll".

But these do nothing., neither does installing Alchemy. It would be great if you could look at adding Windows 11 support in the future.

Thank you!

MarioTainaka avatar Dec 11 '21 18:12 MarioTainaka

Hi, I also have Windows 11 and both Creative Alchemy 1.45.20 and DSOAL work (I have a Sound Blaster Z with the latest drivers), so there must be something wrong with your system.

Kappa971 avatar Dec 12 '21 11:12 Kappa971

Did you actually add the game in Alchemy app instead of just dragging and dropping dsound.dll and ini? Somehow, it is recommended in the description here: https://www.youtube.com/watch?v=fY7i6X41T7U

I'm also curious whether it's possible to inject dsoal renaming dsound.dll to something else, but I doubt. The first when I'd start is: run the game, open Process Explorer>Properties>Threads and check for possible dll names.

Maybe you can also try out these solutions which may also work for DSOAL: https://www.indirectsound.com/registryIssues.html

deton24 avatar Dec 26 '21 00:12 deton24

Did you actually add the game in Alchemy app instead of just dragging and dropping dsound.dll and ini? Somehow, it is recommended in the description here: https://www.youtube.com/watch?v=fY7i6X41T7U

I'm also curious whether it's possible to inject dsoal renaming dsound.dll to something else, but I doubt. The first when I'd start is: run the game, open Process Explorer>Properties>Threads and check for possible dll names.

Maybe you can also try out these solutions which may also work for DSOAL: https://www.indirectsound.com/registryIssues.html

Yup that's the first thing I did. doesn't matter if you use registery settings or use the dir option. Usually on Windows 10 that would do it for me.

MarioTainaka avatar Dec 26 '21 02:12 MarioTainaka

ASUS card? Check out if it's not the case https://steamcommunity.com/app/21090/discussions/0/1739980540129531970/?l=turkish&ctp=2#c1643166649097084726

niedz., 26 gru 2021, 03:14 użytkownik MarioTainaka @.***> napisał:

Did you actually add the game in Alchemy app instead of just dragging and dropping dsound.dll and ini? Somehow, it is recommended in the description here: https://www.youtube.com/watch?v=fY7i6X41T7U

I'm also curious whether it's possible to inject dsoal renaming dsound.dll to something else, but I doubt. The first when I'd start is: run the game, open Process Explorer>Properties>Threads and check for possible dll names.

Maybe you can also try out these solutions which may also work for DSOAL: https://www.indirectsound.com/registryIssues.html

Yup that's the first thing I did. doesn't matter if you use registery settings or use the dir option. Usually on Windows 10 that would do it for me.

— Reply to this email directly, view it on GitHub https://github.com/kcat/dsoal/issues/34#issuecomment-1001094996, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJ3EHEGVWHBLEJSA3C2PQTUSZ3BZANCNFSM5J3JSD2Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

deton24 avatar Dec 26 '21 05:12 deton24

What sound card do you have? As mentioned, I have a Sound Blaster Z with Windows 11 and ALchemy (and DSOAL) works. I would try to reinstall the drivers.

Kappa971 avatar Dec 26 '21 12:12 Kappa971

Realtek

What sound card do you have? As mentioned, I have a Sound Blaster Z with Windows 11 and ALchemy (and DSOAL) works. I would try to reinstall the drivers.

Realtek HD Audio still. On the same setting with Windows 10 installed the above steps just work.

MarioTainaka avatar Dec 26 '21 22:12 MarioTainaka

Probably I'm just running out of ideas, but maybe try different drivers.

  1. These attached on your motherboard vendor site
  2. These from Realtek site
  3. Assuming you have just automatically installed by Windows (generic HD Audio?)

You can still wipe out your current drivers using DDU I suppose.

deton24 avatar Dec 26 '21 22:12 deton24

Drivers have nothing to do with directsound. https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order#standard-search-order-for-desktop-applications Try to check if safe dll search mode is disabled.

mirh avatar Dec 27 '21 12:12 mirh

JFYI, out of curiosity, I tried two alternative methods of injecting DSOAL, but to no avail:

  • proxy via DXwrapper (dxwrapper.ini>LoadCustomDllPath) (logs shows dsoal is injected but there's no HRTF applied)
  • Simple DLL Loader - fork of ASI Loader (still nothing)
  • enbinjector (only works with ENB)

deton24 avatar Dec 27 '21 19:12 deton24

proxy via DXwrapper (dxwrapper.ini>LoadCustomDllPath) (logs shows dsoal is injected but there's no HRTF applied)

Whether or not HRTF is applied depends on OpenAL Soft enabling it. And it only does that if the output device is reported as Stereo Headphones or Headset, and the DLL is built with the HRTF data set built-in (which it is for normal builds). And it wasn't disabled in OpenAL Soft's config file. DSOAL isn't strictly about enabling HRTF for DSound, it's about using OpenAL and its capabilities for DSound. This can be for HRTF, but it can also be for normal speakers (including surround sound, and limited with-height setups through 3D7.1, this hopefully expanding in the future to proper with-height setups), or UHJ for having a surround sound mix in stereo, as well as using EFX to implement EAX.

kcat avatar Dec 27 '21 20:12 kcat

JFYI, out of curiosity, I tried two alternative methods of injecting DSOAL, but to no avail:

  • proxy via DXwrapper (dxwrapper.ini>LoadCustomDllPath) (logs shows dsoal is injected but there's no HRTF applied)
  • Simple DLL Loader - fork of ASI Loader (still nothing)
  • enbinjector (only works with ENB)

I'll try all these methods within the week.

If I use creative alchemy for example the log files do show that the dll is being loaded..

MarioTainaka avatar Dec 27 '21 22:12 MarioTainaka

You're running Windows 11, that's not the problem. Not even Realtek drivers. You don't have a Sound Blaster so you are probably using an "unlocked" version of ALchemy, maybe it doesn't work. DSOAL should work though. Where did you download DSOAL? How are you installing it? Which game do you want to use with it? As pointed out by @deton24, you can use Process Explorer (https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer) to check if dsound.dll is loaded by the game. You can have DSOAL create a log file when the game starts, to see if there are any errors (play only a few minutes because the file can get very large). To the Windows environment variables you need to add: DSOAL_LOGLEVEL=3 DSOAL_LOGFILE=dsoal_log.txt

I think you can set DSOAL_LOGLEVEL=1 to view errors only.

Kappa971 avatar Dec 28 '21 00:12 Kappa971

You're running Windows 11, that's not the problem. Not even Realtek drivers. You don't have a Sound Blaster so you are probably using an "unlocked" version of ALchemy, maybe it doesn't work. DSOAL should work though. Where did you download DSOAL? How are you installing it? Which game do you want to use with it? As pointed out by @deton24, you can use Process Explorer (https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer) to check if dsound.dll is loaded by the game. You can have DSOAL create a log file when the game starts, to see if there are any errors (play only a few minutes because the file can get very large). To the Windows environment variables you need to add: DSOAL_LOGLEVEL=3 DSOAL_LOGFILE=dsoal_log.txt

I think you can set DSOAL_LOGLEVEL=1 to view errors only.

That's the issue DSOAL does NOT work at all. I can't even select EAX. The game I usually use to test to see if everything is working is Prince Of Persia The Two Thrones.

I usually grab it from moddb.

MarioTainaka avatar Dec 28 '21 01:12 MarioTainaka

I completely understand, kcat. It was oversimplification. Of course, I also attached normally working dsoal-aldrv.dll and alsoft.ini with HRTF set with parameters you mention (and HRTF worked when dsound.dll was injected directly from root directory by placing the library near the game's executable, just not when set as a dxwrapper proxy from other location or renamed).

deton24 avatar Dec 28 '21 06:12 deton24

That's the issue DSOAL does NOT work at all. I can't even select EAX. The game I usually use to test to see if everything is working is Prince Of Persia The Two Thrones.

I usually grab it from moddb.

Try downloading it from here: http://vaporeon.io/hosted/dsoal-builds/

As already mentioned, make sure that a log file is created.

Kappa971 avatar Dec 28 '21 07:12 Kappa971

That's the issue DSOAL does NOT work at all. I can't even select EAX. The game I usually use to test to see if everything is working is Prince Of Persia The Two Thrones. I usually grab it from moddb.

Try downloading it from here: http://vaporeon.io/hosted/dsoal-builds/

As already mentioned, make sure that a log file is created.

Just tried the dsoal-latest.7z with this alsoft.ini and HRTF works in RightMark 3D Sound, but EAX options are greyed out whether [eax]enable is set to true or false. Running on a Windows 11 virtual machine fresh install (no registry edits): https://i.imgur.com/RxVvwue.mp4

ThreeDeeJay avatar May 25 '22 15:05 ThreeDeeJay

Remind me again why you'd be supposed to edit CLSIDs sometimes?

mirh avatar May 25 '22 16:05 mirh

You need to add the following registry keys: CURRENT_USER - Add dsound.zip This is DSOAL + OpenAL Soft compiled from source DSOAL.zip, EAX runs on Windows 11 (also on build 22621 which will be released in October) so this issue should be closed to avoid confusion.

Kappa971 avatar May 25 '22 17:05 Kappa971

Beginning with Windows 8 some games won't use IndirectSound even if the dsound.dll is in the correct location. To fix this the Windows registry must be changed. (Some Windows updates may also make it necessary to repeat these changes.)

(One way that games can use DirectSound is to ask Windows for an interface to it by specifying the CLSID. In Windows 8 or later if a game does this Windows will always give an interface to the official Microsoft version of DirectSound. By making these registry changes you are telling Windows to first look for dsound.dll in the same directory that the game is in before it looks for the official Microsoft version.)

@mirh You mean this? It's in the page you linked. Unless you're asking why only some games do it. Maybe it depends on how games call DirectSound, idk. Perhaps @kcat knows and more importantly, if this could be bypassed on DSOAL's end so people don't have to do it manually, especially if Windows updates constantly reset it.

@Kappa971 I'm working on a script to update all relevant registry keys, but just noticed we also need to take ownership of some registry keys even if we're on the current administrator account, which is even less user-friendly than merging a key, let alone adding it manually. On the bright side, I found a tool that allows taking ownership programmatically so I'll add it to the script.

ThreeDeeJay avatar May 25 '22 17:05 ThreeDeeJay

@ThreeDeeJay, I don't think you need a script, just run the .reg file I put in the link and it should work.

Kappa971 avatar May 25 '22 18:05 Kappa971

Unless you're asking why only some games do it. Maybe it depends on how games call DirectSound, idk.

I'm missing out what other factor exists other than just the normal dll loading order, yes.

mirh avatar May 25 '22 18:05 mirh

There is a good chance that if you try to edit this value Windows will show an error message and refuse to accept the change. If this happens it is probably because your account doesn't have the permission required to change the registry key. If you search the internet you can discover how to change the key's permissions.

  • https://www.indirectsound.com/registryIssues.html

@Kappa971 I think if the game is run as administrator (many old games require it), it might use one of the protected registry keys, which require manually taking ownership before adding/editing it, as explained above. Otherwise, it'll probably just use the system dsound.dll, thus ignoring DSOAL, unless maybe you replace the system one with DSOAL, which IIRC is not recommended. Simply merging registry key doesn't actually update the protected ones because by default, only the SYSTEM/TrustedInstaller "users" can make modifications: image vmplayer_LN27tqIT7D

ThreeDeeJay avatar May 25 '22 18:05 ThreeDeeJay

Ok so for games that don't require to be run as administrator my .reg works. What games require to be run as an administrator? I have tried several games: Max Payne, GTA 3, Vice City, San Andreas, Far Cry, Unreal Gold, Splinter Cell, they seem to work without being run as an administrator (I only use d3d8to9 in Ultimate ASI Loader or Dgvoodoo2 and Widescreen patches). Maybe I'm lucky? 😁

Kappa971 avatar May 25 '22 19:05 Kappa971

@mirh Other than what I've mentioned, I've got no clue so that's probably a question for kcat.

@Kappa971 IIRC Splinter Cell Pandora Tomorrow requires running as admin for it to load the .ini (where we can force EAX) from the regular folder instead of the VirtualStore one which can confuse people. But generally running as admin can solve compatibility issues with XP-era games when there was no UAC.

Anyhow, this should hopefully fix registry-related DSOAL issues on Windows 11 (or previous versions for that matter) Register dsound.dll.zip vmplayer_hHKSrG2R8y I'm still not sure why EAX options are still greyed out in RightMark 3DSound Positioning Accuracy test on Windows 11 🤔

ThreeDeeJay avatar May 25 '22 19:05 ThreeDeeJay

@Kappa971 IIRC Splinter Cell Pandora Tomorrow requires running as admin for it to load the .ini (where we can force EAX) from the regular folder instead of the VirtualStore one which can confuse people. But generally running as admin can solve compatibility issues with XP-era games when there was no UAC.

Anyhow, this should hopefully fix registry-related DSOAL issues on Windows 11 (or previous versions for that matter) Register dsound.dll.zip

I'm still not sure why EAX options are still greyed out in RightMark 3DSound Positioning Accuracy test on Windows 11 thinking

I think I tried Splinter Cell Pandora Tomorrow and it worked even without being run as administrator. However, I have found a game that needs to run in Windows XP SP2 compatibility mode, which automatically runs the game as administrator: Mafia 1. When run as administrator (or Win XP SP2), DSOAL doesn't work, so this is definitely one of the cases you described. Therefore, the keys in HKEY_LOCAL_MACHINE must also be changed. I would like to know what SetACL32.exe and SetACL64.exe do. Isn't a batch script running as administrator enough to change the keys in HKEY_LOCAL_MACHINE? (reg add etc...).

EDIT It appears that SetACL32.exe and SetACL64.exe are changing permissions to allow modification of registry keys in HKEY_LOCAL_MACHINE, right? Did you write these programs yourself?

Kappa971 avatar May 25 '22 21:05 Kappa971

Mafia has a shim in W10. Maybe even the other odd games have the compatibility engine to disturb them? mafia

mirh avatar May 25 '22 21:05 mirh

So, SetACL is a utility that you can download from the internet. Here is a detailed guide that helped me understand: https://www.askvg.com/windows-tip-take-ownership-permission-of-registry-keys-from-command-line/.

Other keys are indicated on the Indirectsound website:

 There are additional CLSIDs used to create other DirectSound interfaces. IndirectSound does not currently implement these interfaces, but they are listed here for completeness:

    {B0210780-89CD-11D0-AF08-00A0C925CD16} (DirectSoundCapture Object)
    {E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1} (DirectSoundCapture 8.0 Object)
    {FEA4300C-7959-4147-B26A-2377B9E7A91D} (DirectSoundFullDuplex Object)
    {11AB3EC0-25EC-11D1-A4D8-00C04FC28ACA} (CLSID_DirectSoundPrivate)
        (This last one will likely not be listed in the registry)

but I don't know if they are needed for DSOAL.

However, I wonder what approach Creative Alchemy took to work.

Kappa971 avatar May 25 '22 22:05 Kappa971

Yeah, SetACL is what I used to modify registry key ownership so people don't have to do it themselves since there's no batch command to do it programmatically AFAIK. I didn't program SetACL myself (just the .bat), but I got permission to redistribute it.

And yeah, XP compatibility mode (also required for many old games) also runs as administrator so those games are probably affected as well.

I also wonder if compatibility mode makes DirectSound calls behave differently. I usually run XP games with the respective compatibility mode when suggested for other compatibility reasons but I'm yet to notice DSOAL behaving differently with and without it.

ThreeDeeJay avatar May 26 '22 00:05 ThreeDeeJay

Aaand there you have it. https://lbvenkatesh.wordpress.com/2011/09/18/how-does-a-com-dll-get-loaded/ https://www.vogons.org/viewtopic.php?t=39499&start=320#p692601

Also, idk what's confusing about virtualstore. If the game tries to write to a path outside its privileges, it's already a miracle that microsoft has a mechanism for the thing to still more or less work somehow. If you want the "proper handling" either launch it with admin privileges like it always assumed, or have its folder be unprivileged (or I guess there are also fixes for games to write to the documents folder, but I digress).

mirh avatar May 26 '22 10:05 mirh

Anyway I confirm that by modifying the keys in HKEY_LOCAL_MACHINE, DSOAL also works by running Mafia as administrator.

However, the title of this issue should be changed as it refers to versions of Windows from Vista and later.

Kappa971 avatar May 26 '22 10:05 Kappa971