Skip to content

Let a game publish single sound banks and sequences - #34

Open
SirFancyBacon wants to merge 4 commits into
TheMoonPeople:masterfrom
SirFancyBacon:chronicle-audio-publish
Open

SirFancyBacon wants to merge 4 commits into
TheMoonPeople:masterfrom
SirFancyBacon:chronicle-audio-publish

Conversation

@SirFancyBacon

@SirFancyBacon SirFancyBacon commented Oct 25, 2026 •

Copy link
Copy Markdown

Requires #35, which fixes master's CI; this branch is built on it, so its CI passes once #35 is in. This PR's own change is the last commit.

Lets a game publish one Sony HD/BD bank or one SQ sequence in the existing sound formats, at a path it chooses.

  • Two bridge functions, audio_publish_bank(key, hd, bd, data_out) and audio_publish_sequence(key, sq, data_out), over the converter's existing bank and sequence code (publish_bank / publish_sequence in audio.rs). The published formats are unchanged, and Dark Cloud 2's conversion is untouched.
  • Why: Dark Cloud's sound packs don't have Dark Cloud 2's shape. A pack holds up to eight banks, one per driver slot, with its own load lists and tables, and many packs share the same banks. Chronicle walks its packs itself, calls these once per distinct bank and per sequence, and publishes its own pack documents.
  • Test: a_game_publishes_single_banks_and_sequences_at_the_converters_paths.
  • CI: cargo fmt --check and cargo clippy -D warnings already fail on master in files this doesn't touch (host_jobs.rs's boxed local, SourceBytes with len but no is_empty, a collapsible if, and unformatted lines in archive.rs, jobs.rs, textures.rs and others). This change adds no new warnings.

Used by TheMoonPeople/Chronicle#226 (Dark Cloud's sound in these formats).

cargo fmt --check failed on master in eight files, which stopped the Rust CI job at its first step on every pull request. Formatting only; no code changes.
clippy -D warnings failed once formatting passed: SourceBytes had len without is_empty, a nested if in the DC1 fixed-texture path could be one let chain, and job_set_run takes a Box. The Box stays: the host hands the set over through the bridge as the Box it owns, so the lint is allowed there with that reason.
CMake 4's Ninja generator lists its other outputs on the regeneration edge (build build.ninja <more>: RERUN_CMAKE), so the two tests that looked for the line build build.ninja: RERUN_CMAKE found none on the CI runner's newer CMake. They now accept either form.
A game whose sound packs differ from Dark Cloud 2's walks them itself: Dark
Cloud's packs hold up to eight banks each, one per driver slot, and their
own load lists and tables. audio_publish_bank and audio_publish_sequence
convert one HD/BD bank into bank JSON and WAV samples, or one SQ sequence
into sequence JSON, at a path the game chooses, through the converter's
existing bank and sequence code, so the published formats are unchanged.
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