Skip to content

Add validated portable script audio commands for API 3 - #118

Closed
Roxas2712 wants to merge 31 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-script-audio
Closed

Roxas2712 wants to merge 31 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-script-audio

Conversation

@Roxas2712

@Roxas2712 Roxas2712 commented Oct 22, 2026 •

Copy link
Copy Markdown

Portable scripts can now use play_sound, wait_sound, play_music, stop_music, fade_music, play_once and play_default_music on generations 1–3. Every cue is checked before admission and again at dispatch; native sources and music controllers handle playback, while bounded foreground waits prevent stalled audio from hanging a mod.

Depends on #117 (and its prerequisites). Merge that first. Implementation-only review: https://github.com/Roxas2712/Gen2Recomped/compare/1a09b6c7847a723805fd39e88ea0be17f5dc7795...1fa9d59d90fbb6391a4a6cf994de56c016f40436

Adds native Gen3 sequence-name/index resolution with ambiguity checks and native effect/file dispatch. Options are copied and validated. Retired scripts cannot resume or arm keepMusicOnce after a reentrant unload. Audio already committed to the native controller remains engine-owned.

Validation:

  • 135 focused assertions, including actual Sound dispatch/cache and Music one-shot/restore through a fake audio-device boundary.
  • 152 cross-engine comparisons / 304 isolated runs against pinned Gen1Recomp 79ea62f, all eight supported versions; exact clean feature and combined integration heads.
  • Feature: 92/102 engine suites. Combined integration: 97/107. Both retain exactly the baseline's 17 failed assertions and 10 failed suites; SDK 3/3 and B30 pass.
  • Formatting and git diff checks pass. No imported-ROM or PCM/audio-equivalence claim.

Gen1's Gen3 resolver accepts an unknown string as truthy during preflight; this implementation requires an actual native definition instead. Fade control follows the host controller, not a claim of identical waveform timing. Deferred dialogue cues are a separate follow-up.

Hosted Actions await maintainer approval for this fork (action_required); no hosted pass is claimed: API 3 contracts, ci.

# Conflicts:
#	src/mods/Loader.lua
# Conflicts:
#	docs/modding.md
#	src/mods/Loader.lua
#	src/world/WorldAPI.lua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant