-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Max Payne - crash #23
Comments
Can you get a full trace log? Setting the |
how to to it? |
Nvm, already figured it out! here's the log:
|
Can you help me? I already posted the log. |
If I were to guess, it seems it's expecting Wine's tests suggest native dsound accepts |
Is there any way to fix it? |
Removing the if(format->nAvgBytesPerSec != format->nBlockAlign*format->nSamplesPerSec) check in |
So something in the source code? If yes then great because I never did it! |
@justtoask If you or anyone else stumbling upon this thread haven't figured it out, this fixed it for me. https://community.pcgamingwiki.com/files/file/508-max-payne-sound-fix/ |
Max Payne is pretty hairy with directsound. |
@mirh Hmm interesting. Wonder if bit depth or something similar is what also causes GTA San Andreas to crash when entering a vehicle and radio is on. I've seen threads suggesting a pack that replaces sfx and streams or turning off EAX/audio acceleration altogether to get around the issue. I'll run some tests and will probably open an issue when I get a better idea of what's going on. |
SA comes with eax.dll, aka eax unified.. And there are already tentative fixes talking about downgrading its version. |
Sorry for the really long answer, but I wanted to have better sound AND fix the sound issue and @ThreeDeeJay 's solution only uses the sound fix, which is outdated and it's now recommended to use indirectsound or ALchemy, but I wanted to use DSOAL. It still sucks that no one got any fix trough. |
I'm not sure IndirectSound would help since it doesn't even emulate EAX if you consider it to be "better sound", but ALchemy sounds like a good alternative, at least till this can be solved in DSOAL. I'm not sure there's "quality loss" per se, but the conversion seems to add unwanted artifacts like noise and a faint beep at the end here: On a side note, SFX files' sample rates vary wildly (22.05khz, 22.0khz, 33khz, 26khz) but the converted files I've seen so far retain the same sample rate. Only bit rate changes (from 4 to 8 bit, which doesn't really sound like a downgrade). But the issue seems to be either the script or SoX (probably an old version) are doing a poor conversion job. Perhaps there's a way to fix it so it does a proper/lossless conversion? I might look into it sometime, but I wouldn't get my hopes up.
Sorry I forgot to report back, but I tried all the eax.dll (unified) versions I could find, but they didn't fix the DSOAL crash when getting on motorcycles. The only thing that does fix it is going into the audio options and turning Radio EQ off and back on. |
4-bit ADPCM is better converted to 16-bit PCM instead of 8-bit. ADPCM is an adaptive compression method, where a block of samples starts with a 16-bit sample or two, followed by a run of the 4 bits per sample for the remainder of the block. Each of those 4 bits are used to calculate the next sample using the previous sample with some lookup tables and math. That wouldn't explain the beeping, but it could help with the overall noise. |
You just hit the nail right on the head: 16-bit PCM seems to be our best bet for now. Also I happen to have recorded some quick tests and even though imgur's compression doesn't help, here they are anyway: DSOAL - New sound patch (1.12.1 beta) @justtoask tl;dr this patch should keep audio quality and be compatible with DSOAL. Let me know if this works for you: |
Hi, I can confirm that the patch works. Thanks! |
I honestly forgot about this thread, but I'll try it now and see if it'll work. I'll also include it with my mod pack. |
It works, I've already tried it. But this, more than a fix, it converts Max Payne's audio files to wav and this increases the size of the game. It would be nice if DSOAL (or OpenAL Soft, I don't know), like ALchemy, natively supports Max Payne's audio format so as to avoid any kind of conversion. Anyway thanks @ThreeDeeJay for the patch :) EDIT |
Well it works, but only on SSD, on my HDD drive with the game installed it just freezes. I also wonder on weather I should close this issue. |
I use a HDD and the game works with this patch. Try reinstalling it.
You have to ask @kcat if he wants to implement a fix to make sure that the game with DSOAL doesn't crash without having to convert the audio files. |
I meant that when I try converting the files the bat file just freezes (or seems like it). |
Try defragmenting the disc and reinstalling the game. It could also be that the disc is dying. Maybe someone else can give you some other useful advice. |
I'll try, also do you know how to disable APM? I tried using this tool but it didn't work. |
Also, here's what darkje (the creator of the sound fix) has to say:
|
I think this problem should be fixed in DSOAL so that this patch is no longer needed. Unfortunately the development of DSOAL seems rather slow, I guess because OpenAL Soft requires a lot of work... I hope that after the release of OpenAL Soft 1.22.0, @kcat will take a look at DSOAL :) |
With ALchemy the game does not crash, even without converting audio files. Some change to DirectSound from Windows Vista caused this bug as it happens both with and without DSOAL. If it has been fixed in ALchemy, I think it can also be resolved in DSOAL. But maybe I'm wrong. |
Right, sorry (this must be like the third time I forget this). Does it crash in XP if you break the imaadp32 and msadp32 codecs? And what if you disable hardware acceleration? |
As far as I can tell, the issue is primarily because the DSound buffer is being created with an incorrect AverageBytesPerSecond value for a 44100hz 16-bit stereo buffer, probably as a result of whatever it's using internally to decompress the ADPCM audio. It's supplying the value 177436 when it should be 176400 ( |
@kcat , it is very interesting, thanks for the explanation. Is there a way to make DSOAL behave like ALchemy (at least for this game) in order to avoid crashes and need to convert audio files to PCM WAV? If there is no way, I think then converting audios is the only solution, and then this issue can be closed. |
Presuming that's the actual problem (and not just a symptom where the real problem is elsewhere), it can be made to work by simply removing this check: The |
This seems to fix the game crash (For those who want to try: dsound.zip).
I have a Creative sound card and therefore I can use ALchemy, can I help in any way? For information, without using any wrapper, in Windows 11, the game doesn't crash but the music doesn't play in the main menu (Maybe other sounds are missing as well). |
Apparently DSOAL seems to be the less lenient (than Windows/ALchemy). |
I can confirm the new DSOAL commit also works on my end with vanilla Max Payne 👍 |
|
On a side note, for anyone wondering, the positional listener being placed on Max instead of the camera also happens in XP with real CMSS-3D hardware. |
Sorry to hijack this thread, but there's another problem with MP sounds that might be fixed with dsoal, though I'm not sure, cause it could be engine limitation this time. To be precise, when too much stuff is going on sounds start to skip really noticeably, found moment like that in the first random video on youtube I checked https://youtu.be/qj-p0Kis6KE?t=723 |
Hello. recently i wanted to play Max Payne with complete fix pack and ALchemy sound fix (for the best sound), but when i installed DSOAL the game just crashes! When i used DSOAL 1.1 it didn't have any sound! Here is the log I got:
Help would be appreciated, thanks!
The text was updated successfully, but these errors were encountered: