mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Checked against pspautotests audio/audiocodec, recorded on a PSP. - Atrac3+: at3Related selects headered (mpeg.prx) or raw (libatrac3plus) frames, instead of sniffing for the sync word. The header's size field is 10 bits, as the context's. Header errors 0x211/0x213, bad frames 0x20a, all returning SCE_AVCODEC_ERROR_INVALID_DATA with nothing read. - The first successfully decoded Atrac3+ frame, and the first two AAC frames, produce no output. Checked sample-for-sample against hardware. - Atrac3: the parameter at 0x28 selects the frame layout, as libatrac3plus.prx's table maps it. We used to read its low bit as a joint-stereo flag, which decoded mono (0x0F) streams as stereo garbage. AtracCtx2 had the table's fields swapped the same way. - at3_standalone's Atrac3 output was inverted relative to the PSP's (sceAtrac too). Negate the IMDCT scale. - CheckNeedMem sizes (AAC is 0x658c), codec 0x1004/0x1005, Init validation (AAC sample rate, Atrac3 parameter, Atrac3+ channels), and ReleaseEDRAM clearing edramAddr. - Every call that reaches the ME now blocks for its measured time, and decode time is modelled per codec and frame size. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>