Fix: strip demo defines unconditionally on Play exit
The previous fix gated define-stripping on EP_DEFINES_ADDED — a flag set
The previous fix gated define-stripping on EP_DEFINES_ADDED — a flag set in EnsureDefines only when set.Add actually inserted new entries. If the defines were already present (e.g. a prior capture session leaked them before the lifecycle watcher existed), EnsureDefines saw them as no-ops, the flag was never set, and the lifecycle’s Play-exit hook did nothing.
Result: existing leaks weren’t cleaned up. Audio kept getting hijacked.
Change: drop the gate. Always strip CLAUDE_DEMO_BUILD on every Play exit — it has no legitimate use outside an active capture session. DEMO_BUILD continues to be stripped only when PLAYER_DEMO_BUILD isn’t also set (the player-demo build target uses both together).
Removed EP_DEFINES_ADDED constant + the SetBool call in EnsureDefines since they’re no longer used.
After this commit, the next Play exit will clean up the existing leaked state on machines that ran capture before the lifecycle landed.
Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]
Commit e2408ee by astafford8488.