-
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
Prince Of Persia Revelations sound issue #8474
Comments
dead or alive paradise also lost after a while the sound of the game |
Does any of the sceAtrac sound in the log play? It seems like it plays through to completion, and the ends. Is it supposed to loop, maybe? -[Unknown] |
dead or alive paradise log |
Yes,the sceAtrac in the log is played until 0=sceAtracReleaseAtracID(0) |
dead or alive paradise is I'm not sure why, but trying to change songs while another is still playing seems to break music output entirely. |
That sound is same as psp. |
Can you log the first bytes of each frame? if (!m_audioContext->Decode(audioFrame, frameSize, buffer, &outbytes)) { Add before: NOTICE_LOG(ME, "Audio frame first bytes: %02x %02x %02x %02x", audioFrame[0], audioFrame[1], audioFrame[2], audioFrame[3]); Most of the time, the first byte will be 3a or 3f. I just want to see if it looks like garbage. -[Unknown] |
Oh, so some of the frames parse fine. Well, that's interesting. Does any of the video's sound play? Could you try extracting the video file and playing it with ffplay - just to make sure it's not a glitch in the file (maybe our error handling is bad, but that one error is normal)? It's frame 41. We could try skipping just that one frame: static int frameNum = 1;
if (frameNum++ != 41) {
if (!m_audioContext->Decode(audioFrame, frameSize, buffer, &outbytes)) {
ERROR_LOG(ME, "Audio (%s) decode failed during video playback", GetCodecName(m_audioType));
}
} else {
memset(buffer, 0, 8192);
} That's definitely wrong, but just wondering if it will prevent the error / fix the playback at all to not process that frame. If so, it could either be error handling or something causing that packet to be incomplete. -[Unknown] |
Audio seems fine with that error. |
Still got the error with that change |
Maybe I counted wrong.. can you try 40 or 42? -[Unknown] |
There are other videos before it |
It's 319.the error gone,and sound is still good. |
So if it's just the game trying to play broken data, does the codecCtx_ end up in some kind of error state it can't recover from? Should we try to forcibly restart the decoding? |
Fixed by #8867 |
Oh, that makes a lot of sense. I should've realized that's what was happening. Thanks for checking. -[Unknown] |
- ingame sound lost after a whileloghttps://gist.github.com/daniel229/12b92166ddc54499cfd5The text was updated successfully, but these errors were encountered: