AJM codecs
AJM decodes ATRAC9, MP3, MPEG-4 AAC and Opus. Each codec instance keeps its own state, and an unknown codec is rejected instead of being reported as silent success.
Repository notes through October 10, 2026
Codecs and sample formats
Codec 0 is MP3, through minimp3. Codec 1 is ATRAC9. Codec 2 is MPEG-4 AAC, through FAAD2, for ADTS, raw and SAF jobs. Codec 24 is Opus, through libopus. ATRAC9 output can be signed 16-bit, signed 32-bit, float, or planar. Initialize, codec info, gapless metadata, stream byte counts, decoded-frame counts and total sample sidebands are preserved.
Jobs may use a contiguous buffer or a split buffer. The instance state is per decoder, so two streams do not share a bit reservoir. The legacy libSceAudiodec path uses the same backend for ATRAC9, MP3 and AAC after its own init, create, reset and delete calls.
Movie audio and previews
The observed PlayStation 5 multichannel ATRAC9 layout is decoded as interleaved mono streams. Ghost of Yōtei's movie audio starts at the correct point because of that layout. A haptics track the movie carries is timed with silence. Controller vibration is not synthesized from it.
FSB-backed fallback previews are resampled to the 48 kHz mix, given a short fade, and drained once. They are not mixed into the live AudioOut graph unless PS5_AUDIO_FALLBACK_MIX=1, because a second copy of the same clip is an echo.
Licenses
ATRAC9, FAAD2, minimp3 and Opus are third-party decoders. Their licenses ship in the repository's docs/licenses directory and with the portable build. The emulator's own code stays GPL-3.0-or-later.
A codec number outside the four implemented values is an error. Returning a buffer of zeros and a success code would let a title believe the stream had been decoded.
What is implemented
- ATRAC9, MP3, MPEG-4 AAC and Opus, with per-instance decoder state.
- ATRAC9 output as signed 16-bit, signed 32-bit, float or planar PCM.
- Gapless and sideband metadata, contiguous and split input buffers.
- The shared backend behind libSceAudiodec.
What is still missing
- Unknown AJM codec numbers are rejected.
- Haptics tracks stay silent. Vibration is not emulated from them.
- Fallback preview mixing is off unless PS5_AUDIO_FALLBACK_MIX=1.
Related mechanisms
What these pages are