Getting Max Payne sounds to work on Windows 7

Solution 1:

There's an up-to-date explanation on how to fix it on the Steam forums. If, for some reason, it becomes inaccessible, see my explanation below on how to fix it.


Still doesn't work? Here's how to fix it. Most credits go to some fellow nicknamed Darkje - thanks Darkje! I Prepared a single zip to speed up the process.

Short Method

  1. Download the following zip: maxpaynesoundfix.zip.
  2. Extract it into the Max Payne installation folder (with Steam it should be <base Steam folder>\steamapps\common\max payne).
  3. Double-click the MaxBatch.bat file, wait until it's done. Some warnings may appear - ignore them.
  4. Play the game!

If you can't download the zip for some reason, you can take the long method instead.

Long Method

Step 1: get SoX

You need a distribution of SoX, a utility that can convert sound files from one format to another. Here's a direct link to the download page - just download the file ending with win32.zip. For future reference, the version that worked for me was 14.3.1.

Extract the downloaded zip somewhere, then copy the following files into the Max Payne folder (as specified above in the short method):

sox.exe
libgomp-1.dll
pthreadgc2.dll

Step 2: get RASMaker

RASMaker is a 3D-Realms tool used for extracting the .ras files that contain all the game resources, including the sounds. You can download it as a part of the "MAX-FX Tools" package, which I was able to find on the levels4you site. Unfortunately, the site requires registration to download files - plus, you need to actually install that downloaded application.

Once you install it, copy the following two files from the folder <fx-tools installation directory>\RasMaker\ to the Max Payne folder:

RASMaker.exe
rl.dll

After you copy these files you can remove the installed FX Tools application.

Step 3: create the batch file

The following text is the code for a windows batch file. This was written by Darkje and edited by me (my edit is minor, though, it was just needed to update Darkje's original version to work with the current SoX version).

To create the file, first create a new, blank text file, then copy the following text inside it, and finally rename it to MaxBatch.bat and put it in the Max Payne installation folder.

@echo off
cls
rem --- v0.2 28-Aug-07 ---
echo *** MaxPayne vista sound conversion script by Darkje ***
echo.
echo Welcome!
echo.
rem --- directory setup ---
rem --- default . requires all files in the game dir ---
rem --- specify paths if you like to use the files from an other dir. ---
set rasdir=.
set gamedir=.
set soxdir=.

rem --- restore if backup data deteced ---
if exist "%gamedir%\moved" goto rasrestore

rem --- check paths ---
if not exist "%rasdir%\rasmaker.exe" goto noras
if not exist "%rasdir%\rl.dll" goto norl
if not exist "%gamedir%" goto nogame
if not exist "%soxdir%\sox.exe" nosox

rem --- show paths found ---
echo RASmaker is found in: %rasdir%
echo Game dir is found at: %gamedir%
echo Sox is found in: %soxdir%

rem --- check if the ras files are there ---
if not exist "%gamedir%\x_data.ras" goto rasmis
if not exist "%gamedir%\x_level1.ras" goto rasmis
if not exist "%gamedir%\x_level2.ras" goto rasmis
if not exist "%gamedir%\x_level3.ras" goto rasmis
if not exist "%gamedir%\x_music.ras" goto rasmis
echo Required ras files found!
echo.

rem --- unpack ---
echo Unpacking...
echo.
for %%i in (*.ras) do "%rasdir%\rasmaker.exe" -x "%gamedir%\%%i" "%gamedir%"
echo.

rem --- convert by calling sox batchfile in a loop ---
echo converting wave files ...
for /r .\data %%i in (*.wav ) do call :convert "%%i"
echo.

rem --- create moved dir, and move ras files there ---
echo Moving ras files ...
if not exist "%gamedir%\moved" mkdir "%gamedir%\Moved"
copy "%gamedir%\*ras" "%gamedir%\moved"
echo.
echo Cleaning up ...
echo.
del "%gamedir%\*.ras"

rem --- all ok ---
echo All done, Game unpacked, Sounds converted. 
echo Run Maxbatch again to restore.  
echo Thanks for using MaxBatch.
goto end

rem --- subroutines ---

rem --- convert with sox ---
:convert
%soxdir%\sox -q %1 -u -b 8 "%~d1%~p1outfile.wav"
del %1
ren "%~d1%~p1outfile.wav" %~nx1
goto :EOF

rem --- goto's ---

rem  --- restore game ---
:rasrestore
if not exist "%gamedir%\moved\x_data.ras" goto rasmisb
if not exist "%gamedir%\moved\x_level1.ras" goto rasmisb
if not exist "%gamedir%\moved\x_level2.ras" goto rasmisb
if not exist "%gamedir%\moved\x_level3.ras" goto rasmisb
if not exist "%gamedir%\moved\x_music.ras" goto rasmisb
echo Backup files exist, restore original condition?
echo The ras files will be moved back to the 'Max Payne' dir,
echo extracted and modified data will be deleted,
echo restoring the game to its original condition.
echo.
echo To cancel press Ctrl+C followed by Y[enter] to quit now!
pause
echo.
echo Moving ras files back...
copy "%gamedir%\moved\*.ras" "%gamedir%"
echo.
echo Cleaning up ...
rmdir /s /q "%gamedir%\moved"
rmdir /s /q "%gamedir%\data"
echo.
echo All done, Game restored. Thanks for using MaxBatch.
goto end

rem --- ras file(s) missing ---
:rasmis
echo Error: A ras file was not found, aborting!
goto end

:rasmisb
echo Error: A backup file was not found, cannot restore, aborting!
goto end

rem --- no sox ---
:nosox
echo Error: Sox.exe not found!
echo place it in your max payne game directory and retry.
goto end

rem --- no rasmaker ---
:noras
echo Error: Rasmaker not found!
echo place it in your max payne game directory and retry.
goto end

rem --- no rl.dll ---
:norl
echo Error: rl.dll not found!
echo place it in your max payne game directory and retry.
goto end


rem --- no game ---
:nogame
echo Error: The path you specified as game directory does not exist!
goto end

rem --- end progam ---
:end
rem --- clean up vars ---
set rasdir=
set gamedir=
set rasdir=
rem --- wait for key and exit ---
echo.
pause

Step 4: run the batch file and run the game

Right now your Max Payne folder should contain 6 new files - 3 from SoX, 2 from RASMaker, and the MaxBatch.bat file. These are the same files you would have got from the undownloadable zip - so now just go to step 3 of the short method.

Notes

  • Running the batch file might take a few minutes, be patient.
  • If anything went wrong, you can just run the MaxBatch.bat file again - it will restore the files to the original form.
  • This will probably not work with a modded game :(
  • During the batch run, SoX reported a lot of "dither" warning for me, in the format: sox WARN dither: dither clipped <num> samples; decrease volume?. It didn't seem to cause any problem, though.