Skip to content

Audio and Media

Jason edited this page Aug 18, 2026 · 3 revisions

Audio and Media

Audio and video are layered compatibility problems. A decoder producing samples does not establish that PSP API, scheduling, buffering, and host-device contracts are all correct.

Audio path

flowchart LR
    A["Guest API<br/>returns + ownership"] --> B["Stream state<br/>logical + ring offsets"]
    B --> C["Decode / SAS<br/>frames + mixing"]
    C --> D["Scheduler<br/>timing + wakeups"]
    D --> E["Host queue<br/>SDL3 device output"]
Loading
Layer Questions to preserve
Guest API Return values, error paths, buffer ownership, and observable state.
Stream state Logical position versus physical ring-buffer location.
Codec/mixer Priming, frame boundaries, SAS behavior, and sample format.
Timing Delay, release, preemption, callback, and queue deadlines.
Host device Output routing, queued audio, and device state.

Code map

Path Role
src/rt/audio.c PSP audio services mapped to SDL3 host audio.
src/rt/atrac3p/ and src/rt/atrac3p_bridge.c ATRAC3+ decoder and HLE bridge.
src/rt/mpeg.c MPEG/SAS/ATRAC-adjacent runtime behavior.
src/rt/h264_mf.c and src/rt/h264_null.c Windows Media Foundation path and host-neutral/test alternative.

Warning

Sustained smooth HST audio is not accepted. SAS/mixing, ATRAC3+, and output paths exist in the fuller runtime profile, but rough/stuttering audio remains open in issue #67.

A codec fixture can validate a decoder. Production dispatch or a qualified title route is still needed to establish PSP-visible API behavior. Proprietary streams and derived bytes remain local.

Research: PSP audio and media architecture ยท ATRAC streaming and ring buffers ยท Nakagawa case study

Next: Verification and Testing โ†’ Debugging

Nakagawa Recomp

Architecture

Development

Project

Research site

Clone this wiki locally