Repository navigation
989SND: a bank's unload stops its sounds still playing - #159
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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::bankUnloadednow stops the bank's handlers at once (stopHandler, asStopAllSoundsdoes), then frees the bank's SPU memory and retires it as before.Checked with TMB (engine e2dff55 plus this commit):
🤖 Generated with Claude Code