-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Try to match the initial atrac decode size #6935
Conversation
fixes #3326 ,still missing bgm in the match. |
fixes #5631 |
Resistance demo is fixed, ATRAC3 was more different than I realized. Will need to contruct some good public domain samples with loops and stuff... -[Unknown] |
Hmmm... can you get it to crash in the demo? I did hit another crash in the demo though that appears completely unrelated (divide by zero in gpu memcpy)... Anyway, the demo runs okay for me, at least, getting to the second area and then dying. -[Unknown] |
I can't get crash in the demo,the invalid addresses happen at the beginning,if you don't skip anything in the demo. |
No crashes or invalid addresses in the demo for me. Note: I am using PSP-1000 which I believe to much more closely replicate actual PSP behavior. -[Unknown] |
I upload a savestate which 1 second before the invalid addresses happen. |
Okay, got it. I must've accidentally skipped it, sorry. Hmm, strange... Maybe I still have something wrong for mono audio. Grr, so many variations to test, need more sample audio. Hmm, or not? Maybe it's something else broken in sceAtrac. -[Unknown] |
mono usually for voice. |
Fixes GHA Ohase shifting hangup problem in tenchu4 |
Nice, glad to see the hanging issue with motostorm will be fixed finally. |
Resistance problem seems to be caused by sceAtracGetNextSample() not matching up for some reason, possible it or endSample is wrong. -[Unknown] |
Ah, okay, more testing and looking at the decoded data - I think it's supposed to skip the first N samples, rather than deferring those to the next chunk. I suppose this makes more sense. Also, I'm not sure, but it seems like the decoder always returns a full block of data or none at all (e.g. instead of 3 samples, it gives back 2048, then says it's out.) This is fixable too, will just have to truncate it based on our calculation. -[Unknown] |
f9334fc
to
067d60c
Compare
Okay this works better. I was comparing data, and the beginning of the decoded audio stream doesn't match. This might be a problem in the decoder or a problem in the way it seeks, but it's only for the first couple frames. This is true before my changes as well, though. Resistance definitely works now. Hopefully those other games still do as well. In fact, this might fix more games now. -[Unknown] |
Nana Subete wa Daimaou no Omichibiki doesn't crash now,but would lost bgm in a few second and hangup. |
067d60c
to
326421c
Compare
Okay, how about that? It should improve games that have GHA phase shifting issues, and generally games that hung. -[Unknown] |
326421c
to
db6ad2f
Compare
Tenchu 4 no problem now,Nana Subete wa Daimaou no Omichibiki still hang on title when bgm lost. |
There's no demo of course, right? That's this one? http://forums.ppsspp.org/showthread.php?tid=6273 It wasn't locking up before or losing the background music? Does the log show anything useful? -[Unknown] |
the game should be no demo.before not hang on title,it hangs on the match.now it look like hang when bgm stopped,if you click button quickly,you can go far. the debug log full of these |
#6824 game don't like this change |
Already shown in decode test to be valid.
db6ad2f
to
f114284
Compare
Does that improve the hanging at all? There are a lot of funcs that don't return exactly the right data, I don't want to create one pull request that changes every single last function in sceAtrac, it will be a nightmare. -[Unknown] |
Yes,also fixes the issue #6802 |
This seems to be what the PSP actually does, although not sure. The first result is always smaller by this amount (numerous atrac files tested.)
Not sure the very start is right though, arg.
Some games depend on / expect this, or else they'll let important data get overwritten.
We could probably insert frames instead for GHA phase shifting, but this will solve other bugs too, I think.
I think it's meant to be the last *valid* sample.
2131da5
to
0ebe532
Compare
Just a note JPCSP draft implementation for GHA Phase shifting in |
Alright, let's give it a shot. Looks like solid improvements, nice work. |
Try to match the initial atrac decode size
Well, my workaround for GHA phase shifting is by far not a fix or implementation, I'm staying out of ffmpeg. It just makes it less visible to the game. -[Unknown] |
About Radiant Mythology 3,the music doesn't disappear where it was always disappearing here but when you start a new game and carefully listen to the music and voices,you will notest that the music and the voices are like skipping half a second of the song and something like that happens when you go to another area. I can't explain it very well...in sort,there is still something wrong. |
@unknownbrackets I just think that we might need improve ffmpeg to fix sound bug |
This
uses a bufferskips samples to align the output the same way the PSP aligns its output. Causes the audio/atrac/decode test to pass (though it needs to test more things.)This may improve any game that accidentally relies on the first decode pass writing less data, and should improve how well the number of frames from decode match. I think there was a game JPCSP recently fixed that we suspected this was the case for?
-[Unknown]