Commit Graph
13 Commits
Author SHA1 Message Date
Adrià 77008b2ecc Merge pull request #13934 from alfalfa-star/fix/audiodec-stereo-interleave-order
fix(libSceAudiodec): accept M4AAC surround interleave orders for stereo output
2026-11-01 13:53:47 +01:00
alfalfa-starandClaude Opus 5.5 095d23ea98 fix(libSceAudiodec): accept M4AAC surround interleave orders for stereo output
The Smurfs - Dreams (PPSA21607) creates its raw M4AAC decoder with up to
8 channels and surround channel interleave order 2, and decodes stereo.
Since 8de11f73ee the order threw at creation, so the title aborted before
its first frame. The order only places surround channels, so accept
orders 1 and 2 and throw only when a frame with more than 2 channels is
decoded under one of them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-31 14:05:02 +01:00
zaryabzip 91999d11d5 fix(libSceAudiodec.native): export GetAjmContext and UnregisterCodec from the native module only
On the console only libSceAudiodec.native exports sceAudiodecGetAjmContext
and sceAudiodecUnregisterCodec; libSceAudiodec does not. They move out of
the source shared by both libraries into the native module, and a new
test checks that libSceAudiodec no longer exports them.
2026-10-31 07:47:12 +05:00
zaryabzip 8f941d0364 feat(libSceAudiodec): read the Ajm ids with sceAudiodecGetAjmContext
sceAudiodecGetAjmContext takes a context and two optional outputs, as a
firmware 13.42 run of libSceAudiodec.native shows: a null context
returns 0x807F0002, otherwise the 32-bit ids at offsets 0 and 4 go to
the outputs that are not null and the call returns 0.
2026-10-31 07:28:44 +05:00
ntamas94andClaude Opus 4.8 d29c2d79dc docs(libSceAudiodec): mark the iBwPcm rows as a PS4 10.71 measurement, PS5 stays 13.60
Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-10-30 15:04:40 +01:00
ntamas94 28b395fde4 Merge remote-tracking branch 'origin/main' into docs/ps4-fw1071-audiodec 2026-10-30 13:31:58 +01:00
ntamas94andClaude Opus 4.8 ef9d02700f docs(libSceAudiodec): confirm sceAudiodecCreateDecoder word lengths on PS4 10.71
The iBwPcm entry was measured on a PS5 (firmware 13.60). A PS4 Pro
(firmware 10.71) confirms it for MP3 and M4AAC over iBwPcm -1 to 3:
MP3 accepts only 16-bit (1), M4AAC accepts 16-bit and float (1 and 2),
and every other value returns ERROR_INVALID_WORD_LENGTH.

ATRAC9's word length is not reachable with invalid config data: the
console returns ERROR_AT9_INVALID_CONFIG_DATA for every word length, so
it validates the AT9 config before the word size.

Measured with a homebrew probe calling the console's libSceAudiodec
(valid ctrl, no null pointer to an sce API); source and results can be
attached on request.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-10-30 11:32:48 +01:00
Codex 4cd6d5b80e feat(audiodec): add missing inventory exports 2026-10-30 02:52:20 +02:00
Yunus Shaikh b3b6178347 feat(libSceAudiodec): decode M4AAC with non-delay output enabled
The 28- and 32-byte M4AAC parameter blocks carry two fields at offsets
24 and 28 whose range errors fpPS4 names
SCE_AUDIODEC_ERROR_M4AAC_INVALID_ENABLE_NONDELAY_OUTPUT (0x807F0305) and
SCE_AUDIODEC_ERROR_M4AAC_INVALID_SURROUND_CHANNEL_INTERLEAVE_ORDER
(0x807F0306). shadPS4's AJM AAC decoder outputs every decoded frame from
the first one on when non-delay output is enabled, which is what the
decoder here does, so a decoder created with non-delay output 1 is
accepted and decodes as before. Surround channel interleave orders 1
and 2 still throw, now naming the order: no source says which order
each value selects. Name both errors and test that every access unit
yields its frame from the first one with non-delay output enabled.
2026-10-28 16:03:59 +00:00
boykopovar 8de11f73ee fix(audiodec): validate aac sizes and extended mode ranges 2026-10-21 21:53:27 +03:00
orezraeyandClaude Opus 5.5 bf89bd31e6 fix(libSceAudiodec): reject the PCM word sizes a PS5 rejects
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 20:38:01 -03:00
RickandClaude Opus 5.5 bb95e44e9c fix(libSceAudiodec): decode HE-AAC as the console does
ui_enable_heaac was ignored and FFmpeg applied Parametric Stereo, so an
HE-AAC v2 stream decoded to 48 kHz stereo whatever the flag: 2048
samples in 2 channels per frame, and ERROR_INVALID_PCM_SIZE for a PCM
buffer sized for the console's output. The console returns the 24 kHz
mono core with HE-AAC disabled, and SBR output at 48 kHz in one channel
with it enabled.

AAC access units now reach FFmpeg without their ADTS header, with an
AudioSpecificConfig built from the header or from the raw parameters.
With HE-AAC disabled it signals SBR as absent. With HE-AAC enabled SBR
stays implicit, and a mono stream that FFmpeg decodes to two channels
is reopened with SBR present and Parametric Stereo absent. The new test
decodes fdk-aac HE-AAC v2 and HE-AAC stereo streams, ADTS and raw, with
HE-AAC on and off; it aborts on main.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-13 17:41:48 +02:00
Adrià FranchandClaude 342a8c4590 docs(debt): move library entries to one file per library
Co-Authored-By: Claude <[email protected]>
2026-10-12 20:38:29 +02:00