Files
WoWee/include/audio
Kelsi 3bea234927 perf(audio): load music tracks off the render thread
Starting the login track read a ~6MB MP3 inside the render frame that asked for
it, then AudioEngine::playMusic copied the whole buffer again. That was the
200ms and 160ms 'SLOW render stage uiManager->render' frames at startup.

The read now runs on a worker and update() hands the bytes to the AudioEngine, so
every miniaudio call still happens on the main thread. playMusic takes ownership
and moves instead of copying. A track already loading is not a failure: AuthScreen
checked isPlaying() right after the call and would otherwise have dropped a good
track and re-picked one every frame. A request for a different track replaces the
in-flight one so a zone crossfade is never silently dropped.
2026-07-14 15:05:26 -07:00
..