Skip to content

989SND: a bank's unload stops its sounds still playing - #159

Merged
boubou666 merged 1 commit into
masterfrom
claude/snd-unload-stops-bank-sounds
Nov 27, 2026
Merged

boubou666 merged 1 commit into
masterfrom
claude/snd-unload-stops-bank-sounds

Conversation

@boubou666

Copy link
Copy Markdown
Contributor

The bug: the native 989SND driver retired an unloaded bank but left the sounds playing from it running. The real driver stops them first; OpenGOAL's 989snd, after the same library, frees the bank's handlers in unload_bank.

Where it showed (TMB): quitting a match from the pause menu unloads the level's banks without sending StopAllSounds. The match's music, played from one of those banks, kept going over the menus.

The fix: Engine::bankUnloaded now stops the bank's handlers at once (stopHandler, as StopAllSounds does), then frees the bank's SPU memory and retires it as before.

Checked with TMB (engine e2dff55 plus this commit):

  • A headless quit from the pause menu, with sound recorded:
    • Before the fix, the sound after the quit is identical to the build from before this session: match music plus menu music, around 4,000 RMS.
    • With the fix, it drops to the menu music alone, around 1,000–3,000 RMS, matching the menu's level at boot.
  • TMB's 11 native suites pass.
  • The 1P and 4P replays are identical to TMB main on every recorded field, the RAM image and the sound.
  • The pinned boot and match1p checks match.

🤖 Generated with Claude Code

The native driver retired an unloaded bank but left the handlers playing
its sounds running. The driver stops them first (OpenGOAL's 989snd, after
the same library, frees the bank's handlers in unload_bank). TMB showed it:
quitting a match from the pause unloads the level's banks without a
StopAllSounds, and the match's music, played from its bank, went on over
the menus.

Engine::bankUnloaded now stops the bank's handlers at once (stopHandler,
as StopAllSounds does) before freeing its SPU memory and retiring it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@boubou666
boubou666 merged commit b29bc39 into master Nov 27, 2026
4 checks passed
@boubou666
boubou666 deleted the claude/snd-unload-stops-bank-sounds branch November 27, 2026 01:43
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.

2 participants