fix(venue-crowd): abort stale stinger state on song load

Codex preflight: a stinger straddling a song change could fade back into
the previous song's layer or flush its pending loop.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
byrongamatos
2026-07-12 21:06:04 +02:00
co-authored by Claude Fable 5
parent f362c9a083
commit 663e8ff4a1
+9 -1
View File
@@ -345,7 +345,15 @@
machine.reset();
_prevStreak = 0;
_lastAccuracyPct = null;
if (_venueActive && _manifest && !_stingerUntilEnded) {
// Abort any stinger/pending state from the previous song: its ended
// handler must not fade back into the old song's layers.
cancelFade();
_stingerGen++;
_stingerUntilEnded = false;
_pendingLoop = null;
_loadingLoop = null;
_fadingLoop = null;
if (_venueActive && _manifest) {
showLoop(machine.current, FADE_MS);
}
}