Skip to content
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

Closed
daniel229 opened this issue Jan 22, 2016 · 17 comments
Closed

Prince Of Persia Revelations sound issue #8474

daniel229 opened this issue Jan 22, 2016 · 17 comments

Comments

@daniel229
Copy link
Collaborator

  • video sound problem
27:47:175 readThread   I[ME]: HLE\sceMpeg.cpp:349 First timestamp: 90000, Last timestamp: 723633
27:47:179 readThread   I[ME]: HW\MediaEngine.cpp:87 FF: No accelerated colorspace conversion found from yuv420p to rgba.
27:47:950 user_main    E[ME]: HW\SimpleAudioDec.cpp:190 Error decoding Audio frame (744 bytes): -1094995529 (bebbb1b7)
27:47:950 user_main    E[ME]: HW\MediaEngine.cpp:873 Audio (AT3+) decode failed during video playback
27:49:586 idle0        W[FileSys]: FileSystems\ISOFileSystem.cpp:573 Reading beyond end of file, clamping size 8192 to 6144
27:51:086 user_main    W[ME]: HLE\sceMpeg.cpp:1617 Audio end reach. pts: 721118 dts: 633633

- ingame sound lost after a while

log
https://gist.github.com/daniel229/12b92166ddc54499cfd5

@yuya495
Copy link

yuya495 commented Jan 22, 2016

dead or alive paradise also lost after a while the sound of the game

@unknownbrackets
Copy link
Collaborator

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]

@yuya495
Copy link

yuya495 commented Jan 22, 2016

dead or alive paradise log
ppsspplog.txt

@daniel229
Copy link
Collaborator Author

Yes,the sceAtrac in the log is played until 0=sceAtracReleaseAtracID(0)

@yuya495
Copy link

yuya495 commented Jan 23, 2016

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.

@daniel229
Copy link
Collaborator Author

That sound is same as psp.

@unknownbrackets
Copy link
Collaborator

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]

@daniel229
Copy link
Collaborator Author

@unknownbrackets
Copy link
Collaborator

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]

@daniel229
Copy link
Collaborator Author

Audio seems fine with that error.

@daniel229
Copy link
Collaborator Author

Still got the error with that change

@unknownbrackets
Copy link
Collaborator

Maybe I counted wrong.. can you try 40 or 42?

-[Unknown]

@daniel229
Copy link
Collaborator Author

There are other videos before it

@daniel229
Copy link
Collaborator Author

It's 319.the error gone,and sound is still good.

@hrydgard
Copy link
Owner

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?

@daniel229
Copy link
Collaborator Author

Fixed by #8867

@unknownbrackets
Copy link
Collaborator

Oh, that makes a lot of sense. I should've realized that's what was happening. Thanks for checking.

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants