mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Worked out by dumping the context after every call on hardware. SceAudiocodecCodec now names all of them. Atrac3+: CheckNeedMem and Init parse the format bytes (sample rate, channels, frame size) into the context, and neededMem goes by the channel count. Init also writes the bitrate and the output channels, checks the rate (44100 or 48000), channels and frame size, and fails unless inited is exactly 1. InitMono refuses stereo, and decode honours the output channels. MP3: GetInfo, and every decode, read the whole frame header into the context. Without a frame GetInfo fails and fills in -1, where we guessed. AAC: Init takes the ME's list of sample rates (not 12000) and fails with either flag byte set. GetOutputBytes works for AAC, and goes by the context for Atrac3+ and MP3. GetEDRAM gives every codec the same address, and ReleaseEDRAM clears the allocation at 0x68 (pspautotests audio/audiocodec/context). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>