Audio music: drop the pre-roll packets that repeat the previous block #238
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/holdmysocks--SixNG!238
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/238/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@holdmysocks on GitHub · 2026-11-25 03:08 UTC · original
holdmysocks:claude/audio-music-skip→master· +58 −4 · 2 files · 2 commits · merged 2026-11-25 03:59 UTCIn music banks, the third u32 of each channel's 24-byte block header was documented as always 0. It is a sample count. In blocks after the first, the channel's leading packets worth that many samples are a pre-roll: byte-for-byte copies of the previous block's last packets. We decoded them a second time.
Measured on 150 music banks of audio.rpf:
Effect on exports: an affected stem repeats that audio, falls behind the other stems (bank
52c0000: stems 1, 3 and 4 lag by 7,680, 13,440 and 7,680 samples after the first block, while stem 2 has none), and loses as much at the end, because exports are trimmed to the stored sample count.music_channelsdrops those leading packets in each block. That covers music export and stem windows.music_pre_roll.Tests:
cargo test --release --lockedpasses, and so doescargo check --release --locked --no-default-features -p sixng-cli -p sixng-gui.