I have been facing this problem with Rainbow Six, the game doesn't use DxWnd's winmm wrapper. I tried out the old CDAudio proxy which doesn't work either. I checked out the files used by the game when I launch it using DxWnd using Process Explorer, the game uses DxWnd(as indicated by it using dxwplay.dll, libogg.dll, libvorbis.dll,etc) but it doesn't load the winmm.dll of DxWnd.
Irrespective of any wrapper I choose (_inmm.dll, ogg-winmm) the game doesn't use any custom winmm.dll at all. Could you please look into this game?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'll try as soon as I will be able to, but the lib wrappers have a general problem: they rely on the supposition that the game loads "winmm.dll" whenever it is and that the file in the current folder should be the first choice. But it is perfectly possible that the game could be more specific, fr instance loading "C:\Windows\System32\winmm.dll" and in that case the wrapper would be bypassed. That's why DxWnd non-wrapper mode could be more powerful than a proxy alone, DxWnd hooks (and redirects) the LoadLibrary calls and the library methods directly on the system libraries.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you find a way to pass the redirection, it will be a help for other games like MechWarrior 2. Unlike that game, if I replace the original winmm.dll in the SysWOW64 folder, the game won't run with the file.
On vogons.org however one guy was able to run the game with DxWnd, his one worked fine. I may have another problem with the game but I have no idea what's happening.
When I used the CDaudio proxy, the game ignored the winmm.dll that I put in the game directory.
When I used DxWnd directly, the sound didn't play at all but the game already loaded winmm.dll from SysWOW64.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if I replace the original winmm.dll in the SysWOW64 folder, the game won't run with the file.
You should never replace the Microsoft provided winmm.dll file in the system folder. Doing so will break the MCI API. A winmm.dll wrapper is not the same as a real winmm.dll system library.
I had the backup, so there's nothing to worry. Windows will automatically prevent someone from replacing them so I was aware of what I was doing.
This method worked in a very few games so I just wanted to see if it worked here too; although I was aware it's not a permanent solution and thus came here for help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
On a side note I did not see a "Rainbow Six" entry in the exports folder. This game seems to play well with Dxwnd's default settings except for a few things:
I would enable the "Mouse" tab flag "Hide" for cursor visibility. Else the Windows cursor will become visible together with the rendered cursor in some cases.
Secondly the "DirectX" tab flag "Compensate Flip emulation" fixes the mouse cursor that is leaving trails.
Finally the game Window starts at the specified size and position but if it is minimized or moved it locks to the top left corner as a 640x480 window. This can be remedied by the use of the "Video" tab flag "Anchored" for Window size & position. Or one can use the "Main" tab option "Desktop work area" instead.
Attached is a candidate .dxw export.
EDIT
Also the game seems more fluent when VSync is turned "ON" from the "DirectX(2)" tab.
At a first glance of your log file there is definitely something going wrong.
See the line:
dxwplay: error loading audio CD emulator
And there are several lines of expected InitModuleHooks missing from the log. On my testing the log file size is over 1 megabytes but your log is tiny in comparison at only 8 kilobytes.
Also it appears to be Dxwnd v.2.05.27 from September 2019. For the testing you could download the latest Dxwnd version and extract it in a new folder.
EDIT
The difference in log size and the missing lines for InitModuleHooks was because I forgot to list the "Logs" tab option DxWnd hacks which should also be selected.
Last edit: dippy dipper 2021-03-31
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried the game on a newer version earlier and the same problem occurs. I am unable to try out the game currently due to a storm that took place here; I will reache out soon.
moreover could you share your executable with me, there couls be version differences causing the problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Questions are:
1) do you have a "Music" subfolder below the game folder?
2) do you have a file named "track02.ogg" or "track02.wav" or "track02.mp3" inside that folder?
Last edit: gho 2021-04-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here's some food for thought:
Could something be changing the working directory? I had similar reports on GitHub with a user having issues with the wrapper being ignored. We determined that we both had a valid installation of the game (it was Quake2 in that case) and all files were in the correct place and format. Nonetheless on his system the winmm wrapping was completely ignored. How something like that could happen is a complete mystery. My guess at the time was that it might be related to some change in the dll search order but who knows...
EDIT:
In this case however the emulation is done by Dxwnd hooking the game and intercepting winmm calls directly. So that theory about dll search order is probably a false track.
Last edit: dippy dipper 2021-04-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just noticed I have a problem with Quake 2 too, I tried DxWnd and my files are being ignored too. I set the gane to create logs and it doesn't work. Neither does the Virtual CD Audip function.
On the Rainbow Six side, I just noticed my tracks are not of the same length as yours. Could it be a problem? What if I try your CD tracks with my game?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For Rainbox six the problem is not the content of the tracks but the fact that they are not visible, so the content doesn't matter.
The Dippy's idea is interesting. To know better I should change the log message to have the full path of the searched folder.
Please, be patient. One step at a time we'll get it done.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This recompiled dxwplay.dll should make a full log of CD sound operations in the dxwplay.log file.
Please replace the dll in DxWnd folder, then try to run the game, collect dxwplay.log and post it here.
P.s. one possible tricky cause of troubles is setting a multi-CD situation with a selected CD volume that is not the first. Please, have a look at the "View -> CD charger" panel and check that the tick is on the CD#1.
dxwplay.dll doesn't search for the files every time: it lists them once and cache the result to the file tracklen.nfo. Surely you run the game once when the folder was empty, so the cache tells there's nothing in it, no matter how you fill it.
To recover your situation you have to delete the tracklen.nfo file that is in the Music folder, at next run it will be rebuilt with a correct content.
And I should remember to change the code: when the folder is empty, better avoid creating the cache!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Interesting note: I looked into Dippy's log and decided to reverse DxWnd's process. I copied the part which mentioned the track length and position and then edited the tracklen.nfo in the format in which it should be using another game's tracklen.nfo. The music works.
So why is the application failing to detect the music, as soon as I rename the tracklen.nfo the music stops.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you try using a different sound format for the music files? It would be interesting to know if the tracklen.nfo gets successfully created with .wav files instead of .ogg for example. You can rip the tracks from the CD in .wav or .mp3 format using for example Windows Media Player.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i tried out in .wav, .mp3,. ogg, .flac and none of them work until I manually put the data in tracklen.nfo. It's currentlt in .wav when I changed the nfo myself and the music repeated where it should
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So it would seem that on your system the player can find and play the music files but the files are not found when the tracklen.nfo is being generated. That is puzzling...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been facing this problem with Rainbow Six, the game doesn't use DxWnd's winmm wrapper. I tried out the old CDAudio proxy which doesn't work either. I checked out the files used by the game when I launch it using DxWnd using Process Explorer, the game uses DxWnd(as indicated by it using dxwplay.dll, libogg.dll, libvorbis.dll,etc) but it doesn't load the winmm.dll of DxWnd.
Irrespective of any wrapper I choose (_inmm.dll, ogg-winmm) the game doesn't use any custom winmm.dll at all. Could you please look into this game?
I'll try as soon as I will be able to, but the lib wrappers have a general problem: they rely on the supposition that the game loads "winmm.dll" whenever it is and that the file in the current folder should be the first choice. But it is perfectly possible that the game could be more specific, fr instance loading "C:\Windows\System32\winmm.dll" and in that case the wrapper would be bypassed. That's why DxWnd non-wrapper mode could be more powerful than a proxy alone, DxWnd hooks (and redirects) the LoadLibrary calls and the library methods directly on the system libraries.
If you find a way to pass the redirection, it will be a help for other games like MechWarrior 2. Unlike that game, if I replace the original winmm.dll in the SysWOW64 folder, the game won't run with the file.
On vogons.org however one guy was able to run the game with DxWnd, his one worked fine. I may have another problem with the game but I have no idea what's happening.
When I used the CDaudio proxy, the game ignored the winmm.dll that I put in the game directory.
When I used DxWnd directly, the sound didn't play at all but the game already loaded winmm.dll from SysWOW64.
You should never replace the Microsoft provided winmm.dll file in the system folder. Doing so will break the MCI API. A winmm.dll wrapper is not the same as a real winmm.dll system library.
If you have already messed with the system libraries then I suggest running a system scan and repair in order to try and fix the damage (type "sfc /scannow" in the cmd prompt):
https://support.microsoft.com/en-us/topic/use-the-system-file-checker-tool-to-repair-missing-or-corrupted-system-files-79aa86cb-ca52-166a-92a3-966e85d4094e
I had the backup, so there's nothing to worry. Windows will automatically prevent someone from replacing them so I was aware of what I was doing.
This method worked in a very few games so I just wanted to see if it worked here too; although I was aware it's not a permanent solution and thus came here for help.
I have now tested Rainbow six (1998, Red Storm Entertainment) with Dxwnd's cdaudio emulation and the music seemed to work fine.
I would suggest you do to the following experiment:
Overwrite
System libs
Debug
Sound
P.S.
Remember to turn off logging when playing the game normally or else you could end up with a huge log file taking space on your hard drive.
I have attached here my log as a reference.
On a side note I did not see a "Rainbow Six" entry in the exports folder. This game seems to play well with Dxwnd's default settings except for a few things:
I would enable the "Mouse" tab flag "Hide" for cursor visibility. Else the Windows cursor will become visible together with the rendered cursor in some cases.
Secondly the "DirectX" tab flag "Compensate Flip emulation" fixes the mouse cursor that is leaving trails.
Finally the game Window starts at the specified size and position but if it is minimized or moved it locks to the top left corner as a 640x480 window. This can be remedied by the use of the "Video" tab flag "Anchored" for Window size & position. Or one can use the "Main" tab option "Desktop work area" instead.
Attached is a candidate .dxw export.
EDIT
Also the game seems more fluent when VSync is turned "ON" from the "DirectX(2)" tab.
Last edit: dippy dipper 2021-03-31
Your enhancements are great. However I enabled Virtual CD Audio and now music doesn't work:
Last edit: BEEN_Nath_58 2021-03-31
At a first glance of your log file there is definitely something going wrong.
See the line:
And there are several lines of expected InitModuleHooks missing from the log. On my testing the log file size is over 1 megabytes but your log is tiny in comparison at only 8 kilobytes.
Also it appears to be Dxwnd v.2.05.27 from September 2019. For the testing you could download the latest Dxwnd version and extract it in a new folder.
EDIT
The difference in log size and the missing lines for InitModuleHooks was because I forgot to list the "Logs" tab option DxWnd hacks which should also be selected.
Last edit: dippy dipper 2021-03-31
I tried the game on a newer version earlier and the same problem occurs. I am unable to try out the game currently due to a storm that took place here; I will reache out soon.
moreover could you share your executable with me, there couls be version differences causing the problem.
@Dippy Dipper: thanks for the export file and support, I added it to the archive.
I tried it out on 2.05.68 and the problem still occurs. I also tried twice with tracks extracted and another directly from CD, but it still remains.
Honestly, I don't know how you can make such a step fail, but you did: "found 0 tracks" = no music to play.
Questions are:
1) do you have a "Music" subfolder below the game folder?
2) do you have a file named "track02.ogg" or "track02.wav" or "track02.mp3" inside that folder?
Last edit: gho 2021-04-01
I noticed the problem before but I am confused to if it's something else. Here's my folders:
Here's some food for thought:
Could something be changing the working directory? I had similar reports on GitHub with a user having issues with the wrapper being ignored. We determined that we both had a valid installation of the game (it was Quake2 in that case) and all files were in the correct place and format. Nonetheless on his system the winmm wrapping was completely ignored. How something like that could happen is a complete mystery. My guess at the time was that it might be related to some change in the dll search order but who knows...
See MS docs:
https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-redirection
https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order
EDIT:
In this case however the emulation is done by Dxwnd hooking the game and intercepting winmm calls directly. So that theory about dll search order is probably a false track.
Last edit: dippy dipper 2021-04-01
I just noticed I have a problem with Quake 2 too, I tried DxWnd and my files are being ignored too. I set the gane to create logs and it doesn't work. Neither does the Virtual CD Audip function.
On the Rainbow Six side, I just noticed my tracks are not of the same length as yours. Could it be a problem? What if I try your CD tracks with my game?
For Rainbox six the problem is not the content of the tracks but the fact that they are not visible, so the content doesn't matter.
The Dippy's idea is interesting. To know better I should change the log message to have the full path of the searched folder.
Please, be patient. One step at a time we'll get it done.
This recompiled dxwplay.dll should make a full log of CD sound operations in the dxwplay.log file.
Please replace the dll in DxWnd folder, then try to run the game, collect dxwplay.log and post it here.
P.s. one possible tricky cause of troubles is setting a multi-CD situation with a selected CD volume that is not the first. Please, have a look at the "View -> CD charger" panel and check that the tick is on the CD#1.
I checked the settings and CD #1 was selected by default. Here is the log:
Last edit: BEEN_Nath_58 2021-04-01
It should be this:
dxwplay.dll doesn't search for the files every time: it lists them once and cache the result to the file tracklen.nfo. Surely you run the game once when the folder was empty, so the cache tells there's nothing in it, no matter how you fill it.
To recover your situation you have to delete the tracklen.nfo file that is in the Music folder, at next run it will be rebuilt with a correct content.
And I should remember to change the code: when the folder is empty, better avoid creating the cache!
I deleted the tracklen.nfo, which is still empty, and now it says this:
Interesting note: I looked into Dippy's log and decided to reverse DxWnd's process. I copied the part which mentioned the track length and position and then edited the tracklen.nfo in the format in which it should be using another game's tracklen.nfo. The music works.
So why is the application failing to detect the music, as soon as I rename the tracklen.nfo the music stops.
Can you try using a different sound format for the music files? It would be interesting to know if the tracklen.nfo gets successfully created with .wav files instead of .ogg for example. You can rip the tracks from the CD in .wav or .mp3 format using for example Windows Media Player.
i tried out in .wav, .mp3,. ogg, .flac and none of them work until I manually put the data in tracklen.nfo. It's currentlt in .wav when I changed the nfo myself and the music repeated where it should
So it would seem that on your system the player can find and play the music files but the files are not found when the tracklen.nfo is being generated. That is puzzling...