From 17a4c2cf89a9b34c8b1b6db9bf17cd46ddb3c93b Mon Sep 17 00:00:00 2001 From: David Racine Date: Sun, 6 Sep 2026 09:10:21 -0400 Subject: Reopen the OPUS decoder when a note moves to another sample (#7137) 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 Co-authored-by: serprex <159546+serprex@users.noreply.github.com> --- soh/src/code/audio_playback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'soh/src/code') diff --git a/soh/src/code/audio_playback.c b/soh/src/code/audio_playback.c index ce6c5d6f1..ba250252c 100644 --- a/soh/src/code/audio_playback.c +++ b/soh/src/code/audio_playback.c @@ -150,7 +150,7 @@ void Audio_NoteInit(Note* note) { note->noteSubEu = gDefaultNoteSub; } -extern void aOPUSFree(struct OggOpusFile* opusFile); +extern void aOPUSFree(struct OpusDecState* dec); void Audio_NoteDisable(Note* note) { if (note->noteSubEu.bitField0.needsInit == true) { note->noteSubEu.bitField0.needsInit = false; -- cgit v1.2.3