Skip to main content
Print

PSP Audio and Media Architecture

Type: REFERENCE   Status: MAINTAINED   Scope: ATRAC, SAS, sceAudio, MPEG/PSMF, Media Engine, and host codec boundaries

A correct decoder is not automatically a correct PSP media subsystem. PSP media behavior is layered: stream/container ownership, codec state, ring buffers, sample/frame timing, SAS mixing, audio-channel submission, and Media Engine services each expose different contracts.

How We Know

container / stream (ATRAC, PSMF, MPEG)
                 |
                 v
codec state + ringbuffer / access units
                 |
       +---------+---------+
       v                   v
   PCM frames          video frames
       |                   |
       v                   v
   SAS mix / effects    display / GE path
       |
       v
sceAudio channel submission -> host output device
Source-owned layered media diagram.

ATRAC is codec state plus PSP streaming semantics

PRIOR ART: PSPSDK exposes ATRAC IDs, stream-data information, add-stream-data, decode, next-sample, loop, reset, and second-buffer operations. These APIs describe a stateful streaming contract; they are not just a function from compressed bytes to PCM.

IMPLEMENTATION FACT: Nakagawa tracks frame size, ring-buffer/refill state, decoder history, loop/reset behavior, and bridges one validated frame to the public ATRAC3+ decoder. The bridge’s codec correctness is only one layer of the HLE contract.

SAS and sceAudio are separate layers

SAS is the PSP software mixer/voice engine: voices, key-on/off, pitch, volume, envelopes, effects, and PCM/VAG/ATRAC-fed data. sceAudio reserves channels and submits PCM buffers with blocking/non-blocking behavior and device timing. A nonzero decoder output does not prove that the game keys a SAS voice, mixes it, or submits it to a host device with PSP timing.

MPEG/PSMF and the Media Engine

PSMF/MPEG adds containers, access units, ring buffers, timestamps, AVC/ATRAC decode, and output scheduling. The Media Engine is a second MIPS-derived processor and multimedia execution context; high-level PSP APIs can hide it from a title-oriented static recompiler. HLE can reproduce public API semantics without statically recompiling private firmware modules.

Host codec boundary

FFmpeg or another host codec can provide decoded samples, but host decoder success does not settle PSP priming, loop tails, frame/sample counts, refill boundaries, error codes, or timing. Keep codec input/output validation, PSP state transitions, and host device buffering separately testable.

Do Not Infer

  • A decoder passing a synthetic frame is not a complete sceAtrac contract.
  • PCM in a guest buffer is not proof of SAS voice/mix/output behavior.
  • A host audio device callback is not PSP blocking-output timing.
  • One private title stream is not public platform evidence.

Open questions

High-value public work includes legal/source-owned ATRAC fixtures, first-frame/priming and loop tests, second-buffer/refill boundaries, SAS voice/envelope conformance, sceAudio routing/blocking behavior, and synthetic PSMF/MPEG ringbuffer fixtures. Track title-specific media separately from platform pages in Open Research Questions.

Primary sources

Table of Contents