GitHub Vita Lite - Wolff's Store
Code / README | Releases | Issues
WolffsRoom/godot4-psvita / platform / vita

AUDIO_BACKEND.md

3265 bytes ยท Original / download

Vita audio backend

Implemented routing

Godot 4 Vita uses Godot AudioServer for stream mixing. The platform adapter emits native interleaved stereo 16-bit samples at 48 kHz.

The preceding implementation sent each 2048-frame block to the PS Vita MAIN output port at maximum hardware volume. The new implementation adapts the BGM-port technique seen in the local DeltaruneVita project:

The DeltaruneVita reference uses OpenAL for game sound, buffered Vorbis music and a BGM channel for direct PCM playback. This port deliberately does not copy its OpenAL runtime or interfere with the original DeltaruneVita tree: Godot still uses its own AudioServer and Bus architecture.

Testing

Future diagnosis if clipping persists

  1. Collect on-device ux0:data/godot_loader.log audio route line (BGM vs MAIN, volume_rc, any output failure).
  2. Compare behavior on built-in speakers vs headphones and at 50% game volume versus 100%.
  3. If audio still breaks, capture an output block or investigate SCE audio scheduling and Godot bus processing for clipping/underruns.

Output layout option (2026-10-25)

audio/vita/output_mode selects the hardware layout. The default is now godot3, the layout of the Godot 3 Vita driver used by the Dome Keeper port (see GodotPSV/docs/AUDIO_GODOT3_VITA_DOMEKEEPER.md), which plays without distortion on hardware:

Set audio/vita/output_mode="main48" in a project to keep the previous layout (MAIN 48 kHz, 2048 frames, 72% hardware gain, ALC off, high priority / CPU3). Ports pick up the new default only when their runtime is rebuilt. The startup log line is [vita-audio] layout=... route=... frames=... rate=....