Reopen the OPUS decoder when a note moves to another sample - #7137
Open
bassdr wants to merge 1 commit into
Open
Conversation
bassdr
force-pushed
the
fix/streamed-note-stale-opus-decoder
branch
from
August 31, 2026 03:59
6e93a89 to
d00423b
Compare
serprex
reviewed
Aug 31, 2026
The decoder cached on a note was keyed on nothing, so a note reused for a different streamed sample carried on decoding the previous track. Audible as the wrong custom music: the sequence and soundfont the audio editor reports are correct, only the samples reaching the mixer are not. Reproduced on the game-start cutscene chain with a streamed music pack in 4 of 6 runs; 0 of 6 after. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Ex3z29fQzPEZgwH4EA641
bassdr
force-pushed
the
fix/streamed-note-stale-opus-decoder
branch
from
August 31, 2026 22:47
d00423b to
fd9f4d3
Compare
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.
Fixes #5684.
aOPUSdecImplcaches itsOggOpusFileon the note and keys it on nothing, so a note reused for a different streamed sample carries on decoding the track the previous note was playing.Audio_NoteDisablefrees the handle, butAudio_NoteInitForLayercan run on a note that still owns one.This is why the audio editor looks right: sequence and soundfont selection are correct, only the samples reaching the mixer are not. #6736 fixed the selection half of the issue; this is the rest.
Reproduced on the game-start cutscene chain with a streamed music pack (OOT OST Enhanced) in 4 of 6 runs, 0 of 6 after. Detected with a probe on
aOPUSdecImplcomparing the source buffer against the one the open handle was created for.Build Artifacts