ThirteenAG / WidescreenFixesPack

Plugins to make or improve widescreen resolutions support in games, add more features and fix bugs.
https://thirteenag.github.io/wfp
MIT License
2.26k stars 215 forks source link

[GTALCS.PPSSPP] Sound issue on 60 FPS. #1028

Open AliceTS1337 opened 2 years ago

AliceTS1337 commented 2 years ago

There's an issue with 60 FPS where the sound buffer will overflow and will end up playing the wrong sounds and sometimes very loudly, and the sounds will occasionally keep playing forever until the sound buffer is cleared. (It clears when you pause the game.)

Although, in multiplayer, you are not able to pause the game the same way you do in singleplayer, therefore; the sound buffer never gets cleared and I'll have to go through a very painful time for my ears playing some multiplayer matches.

If you could, please attempt to fix the sound buffer in some way so that it cannot overflow. Or at the very least, clear it upon overflowing or clear the last played sound.

ThirteenAG commented 2 years ago

I wouldn't know anything about that. If you could point me out to the code where it does that, then maybe I can take a look.

AliceTS1337 commented 2 years ago

Unfortunately I do not have the addresses for the memory region responsible for sound related functions. I was hoping you'd be able to find them.

I will try to locate them as well when I have time. :)

ThirteenAG commented 2 years ago

At least the buffer in question is needed, I have no clue how to find it.

ThirteenAG commented 2 years ago

@AliceTS1337 can you try this version of a plugin and see if it makes any difference? GTALCS.PPSSPP.WidescreenFix.prx.zip

JuniorDjjr commented 2 years ago

Jéssica Natália tested it and it looks the same, she said that there is a similar problem in other PSP games, which is interesting to know: https://github.com/hrydgard/ppsspp/issues/14010 They didn't mention framerate, but the video is marking 60 FPS, so it could be the same issue. Remembering that the problem is solved when you pause the game, and that issue said the exact same thing, when it pauses it solves the problem. What is the similarity between these games? Same audio engine?

ThirteenAG commented 2 years ago

I don't know how to reproduce it.

JuniorDjjr commented 2 years ago

How it happened: New game, get out of the car, get a random car on the street, walk around the first island for 5~10 minutes, using Vulkan. edit: also OpenGL.

Probably the problem happens with any case or any API, not tested, but here's an example. It's a known problem in the community, it's been a long time, many people have it.

JuniorDjjr commented 2 years ago

It happened on DX9 too, it took 15 minutes now. You are probably not testing long enough. 5 minutes on DX11.

ThirteenAG commented 2 years ago

I've tried two times, entered car and exited, then left the game running for 5 minutes. Something happened with sound. Then I enabled the fix, and left the game running for 2 hours. Nothing happened. Uploaded new release to github, so everyone can test.

JuniorDjjr commented 2 years ago

Not fixed here, looks like the same.

Also, a single test of 2 hours doesn't seem like a good idea, I didn't see it happening but it's possible that there are cases where the problem never appears (leaving the character stopped in the same place for example). All tests performed were walking/driving around the map for 5~10 minutes.

It also seems that the cardboard box always starts the bug when touching it (maybe because it plays a lot of sounds for each impact), but the bug appeared even before reaching one, and when you touch it a bit, it soon makes a big noise.

ThirteenAG commented 2 years ago

GTALCS.PPSSPP.WidescreenFix.elf.zip Can you try with this version?

JuniorDjjr commented 2 years ago

GTALCS.PPSSPP.WidescreenFix.elf.zip Can you try with this version?

I sent it on my Discord and nobody knew how to install it (they tried to rename it to .prx with no effect), Is the file really correct?

ThirteenAG commented 2 years ago

Ah, sorry, I clicked on the wrong file accidentally. Anyway I tested myself and it seems it still doesn't work. So still no clue how to fix it.

AliceTS1337 commented 2 years ago

The sound bug occurs when there's a lot of sounds playing at once, so it's important to be driving around a lot and drifting/shooting/crashing into stuff, honking, whatever. Do as much as possible. I'll test the latest version to see if there's any difference at all.

AliceTS1337 commented 2 years ago

Okay, I can conclude that the sound issue definitely doesn't appear as often with the attached GTALCS.PPSSPP.WidescreenFix.prx.zip version, however it can still be easily reproduced when spamming the honk button, and on the rare occasion you'll hear constant tire squeal permanently.

(And some sounds still get replaced, such as cars engine sounding like higher pitched honks or tire squealing.)

EDIT: After a little extra while of just playing around and doing missions, the sound bugs appeared all over the place: https://youtu.be/XRgj2Z9fkzU

ThirteenAG commented 1 year ago

Can anyone test something regarding this issue?

KILROY41 commented 1 year ago

What exactly to test? all your versions of WideScreenFix I downloaded and tried, the game distorts the sound when you shoot, drive around the city and sometimes the voice of the NPS. Short-term helps enter the menu PSP is me on the Enter key if that. VCS passed quietly at 100% and there such did not encounter.

ThirteenAG commented 1 year ago

The version that is uploaded now.

Doommarine23 commented 1 year ago

Hi, just wanted to chime in. I've tested the version that is dated 2023-02-18 from your github.io, and while the sound problem is far less common, it still occurs.

I haven't seen it happen with car horns, but it still happens with tire screeches.

Luckily I was able to grab a save state with PPSSPP on my phone, and I can share it if requested.

Thank you for tackling this issue, I am sure it can't be easy, but I appreciate the effort.

Edit: Its almost like they replace the engine sounds. I have a second save state where it seems to replace the reversing engine sound for my vehicle. I also had the radio static when tuning the radio loop when I set it to "OFF", that only happened once though.

KILROY41 commented 1 year ago

I have an idea, but need a skillful hand to do it. I have GTA Re:LCS beta 5 and beta 6. It is a computer port where there are all the cutscenes, missions and radio stations. I can safely say that there at 60 fps there are no such problems. So I think you can somehow convert that audio file in the PSP version and replace them with the original. Now this modification can not get as our "favorite" take two banned it. I can give you both versions of repack by mail GTA Re:LCS beta 5 and beta 6. P.S I think this is due to Audio as in Vice City Stories like the engine the same but at 60fps sound problems are not observed.