-
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
Code Lyoko audio softlock (now: bad playback) #19994
Comments
@Xibancry |
Yes, it's on sector 5 for the savefile I sent. It's not the only place it happens |
Media log easier to check 18:26:659 ATRAC3 Load D[ME]: HLE\AtracCtx.cpp:235 ATRAC analyzed: AT3Plus channels: 2 filesize: 70164 bitrate: 94 kbps jointStereo: 0 ATRAC3 related |
Even v1.16.6 don't softlock, the voice has some problem |
v1.17.1-264 good |
git bisect result: a1ac79c |
Thank you for the bisect, not surprising, it's when we switched the decoder to not use ffmpeg. I think this is another case of not detecting mono properly, so the decoder tries to parse it as stereo and fails. Will need to figure out how it worked before.. |
@hrydgard Before it cannot decode mono correctly , but it do not have error . |
@hrydgard I have a idea. For streamed ATRAC3+ , I think that we do not change track_.channels , so it assume stereo. |
Force to change to mono still fail. if (!decoder_->Decode(indata, track_.bytesPerFrame, &bytesConsumed, outputChannels_, (int16_t*)outbuf, &outSamples)) {
track_.channels = 1;
if (!decoder_->Decode(indata, track_.bytesPerFrame, &bytesConsumed, outputChannels_, (int16_t*)outbuf, &outSamples)) {
// Decode failed.
*SamplesNum = 0;
*finish = 1;
return ATRAC_ERROR_ALL_DATA_DECODED;
}
} |
Ignore decode error can work around....Before v1.19 release make the hack ? |
If we can't fix it, yeah. |
Now we don't generate an error code when the channel configuration doesn't match the packets. See the code comment for what I've been able to figure out so far. See issue #19994
#20005 will probably work as a workaround, but I don't think it'll fix broken audio.. Something is really going wrong in decoding here. |
#20005 work as a workaround |
Jpcsp emulator log edit: From JPCSP emulator log, channels=2 all the times |
Hm. Might have to dig into how JPCSP handles this then... Thanks for letting me know. |
Can you code (logging) the data of the "data chunk" in PPSPPP so that I can compare it in JPCSP emulator ? 5:05:40 DEBUG hle.sceAtrac3plus - ATRAC3 Load thread - sceAtracSetDataAndGetID buffer=0x08A5C340, bufferSize=0x800 |
I don't know this code |
Probably because you can get compilation error when declaring and initializing a variable inside |
It's nicer to have the break inside the {} of the case, but it doesn't really matter. I'll look into this more in a little while. |
Hm, jpcsp seems to handle the channel blocks exactly the same: Wonder what is different.. |
edit last: I know what is the problem |
Easy to compare JPCSP emulator log. Debugging in hrydgard#19994
So what is it? :) I merged your logging change. |
Updated PPSSPP log: |
After update source, debug build (VS2022): |
Game or games this happens in
ULES-01095 - Code Lyoko: Quest for Infinity
What area of the game / PPSSPP
Many areas affected. Only when some voice audio tracks play. The text box showing dialogue appears but it fails to play the voice audio preventing it from closing and effectively softlocking the game everytime it happens (this is apparently consistent with some dialogues). Only solution around it is to reset the game.
Adding a savefile previous to softlock. Softlock occurs on the third dialogue just after defeating the first enemy in the level.
ULES01095DATA00.zip
What should happen
The game should play the dialogue normally without preventing the dialogue box from closing and not softlocking the game.
Logs
ppsspplog.txt
Platform
Windows
Mobile device model or graphics card (GPU)
RTX 2080 Super
PPSSPP version affected
v1.18.1 - 0f50225
Last working version
v1.16.6
Graphics backend (3D API)
Direct3D 11
Checklist
The text was updated successfully, but these errors were encountered: